Open FALLAI-Denis opened 3 years ago
@FALLAI-Denis Thanks for the feedback. We are looking at how we can improve syntax highlighting, one of the issues we come against is VS Code uses Textmate for syntax highlighting which has some limitations for situations like this. We will label this as a bug and continue our research.
Hi,
Regarding the colorization of conditional compilation directives, I found the origin of the problem in the textmate grammar.
for >>if
, >>else
, >>end-if
:
for all other directives of the form >>xxxx
:
I think this could be corrected by a rule of the form:
Ich bin derzeit nicht im Büro. Ich kehre zurück am 03.01.2022. Während meiner Abwesenheit bitte bei Postkorb SCM-Admin melden!
Die Rückmeldung bezieht sich auf ein Mail mit folgendem Thema: Re: [IBM/zopeneditor-about] COBOL - Improve conditional compilation support (syntax highlighting) (#88)
Gesendet (c) GRZ/RSG Linz 2021 Agent 'Abwesenheit'
Raiffeisen Software GmbH Firmenbuchnummer: 86804d, Landesgericht Linz UID: ATU 36961105
Hi,
Problem still present in ZOE 3.0.0.
Also missing new compiler directive for IBM Enterprise COBOL V6R4: >>data
Correction suggestion:
{"match": "(?<=^.{6})\\ +(>>(?i:DATA|DEFINE|ELSE|(?:(?:END-)?EVALUATE)|(?:(?:END-)?IF)|INLINE|WHEN)\\b)",
"name": "meta.preprocessor.cobol strong"
},
{"match": "(?<=^.{6})\\ {5,}+(>>(?i:(?:CALLINT(?:ERFACE)?))\\b)",
"name": "meta.preprocessor.cobol strong"
},
Tested by modifying current cobol.json
file:
Hi,
Problem still present in ZOE 3.1.1... 😢
{
"match": "\\$(?i:if|else|then|display|xfd|end)(.*$)", <-- ok for Microfocus, gnuCOBOL... specific syntaxe...
"name": "meta.preprocessor"
},
{
"match": "(?:^|\\s+)>>(?i:if|else|elif|end-if)(?:$|\\s.*$)", <-- wrong for ISO COBOL, IBM... standard syntaxe (not >>elif)... missing other directives...
"name": "invalid.illegal.cobol"
},
Proposal:
"match": "(?:^|\\s+)(>>(?i:callint(?:erface)|data|define|if|inline|else|end-evaluate|end-if|evaluate|when))($|\\s.*$)",
"captures": {
"1": {
"name": "keyword.control.directive.cobol emphasis"
},
"2": {
"name": "comment.line.directive.cobol emphasis"
}
}
},
{
"match": "(?:^|\\s+)>>(?i:elif)(?:$|\\s.*$)",
"name": "invalid.illegal.cobol"
},
giving:
Hi,
The coloring of conditional compilation directives is still not uniform. Furthermore, some of our developers are disturbed by the presence of conditional compilation directives in the source code. We would like a neutral, low-intensity color, such as medium gray, to be applied to all compilation directives.
Thanks.
Description of the enhancement requested
Currently the syntax highlighting of compilation directives, in particular conditional compilation directives, is not uniform.
On my VS Code configuration (with default options):
>>if
/>>else
/>>end-if
directives are colored in red (not bold)>>directive
are colored in bold green>>
prefix are colored blue, sometimes bold, sometimes notWe suggest that compilation directives, and in particular conditional compilation directives, use specific syntax highlighting that clearly distinguishes them from COBOL source code. For example :
Is it possible to change the syntax highlighting for some COBOL elements yourself? And if yes, how ?