Closed FALLAI-Denis closed 1 year ago
Related issue: #248
Hi,
For the textmate issue, I think the problem is here, and it's not just about the replacing
keyword:
{
"match": "(?<![-_])(?i:...|replacing|...)(?=\\s|\\.|,)",
"name": "keyword.identifers.cobol"
},
the regular expression used expects a continuation after the keyword: a space, a point, or a comma.
It would also be necessary to provide the sequence end of line $
.
Or maybe just indicate a word separator\b
.
Test with end-of-line:
{
"match": "(?<![-_])(?i:...|replacing|...)(?=\\s|\\.|,|$)",
"name": "keyword.identifers.cobol"
},
This problem seems to be generalized in the textmate grammar because there are many expressions of the form (?=\\s|\\.)
which do not provide for the physical end of line.
Hi,
Regarding regular expressions used to isolate words in a COBOL sentence, I suggest using the following pattern:
(?<![\-])\b(?i:KEYWORD1|KEYWORD2|...|KEYWORDn)\b(?![\-])
Fixed in Z Open Editor v3.2.0
Development environment used
Problem Description
Textmate error
The coloring of the term "replacing" in the "copy" directive depends on the content of the rest of the line:
COBOL Language Server error
If a floating comment is placed after the term "replacing" it is considered to be COBOL code.
Observed behavior