Closed FALLAI-Denis closed 1 year ago
This enhancement would be helpful to our development. We use the line number area and the identification area to link program changes to our change management documentation (primitive meta data). Having them colored differently would make the code easier to read.
Ich bin derzeit nicht im Büro. Ich kehre zurück am 06.12.2021. 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 text colorization for syntax highlighting by textmate grammar (Issue #182)
Gesendet (c) GRZ/RSG Linz 2021 Agent 'Abwesenheit'
Raiffeisen Software GmbH Firmenbuchnummer: 86804d, Landesgericht Linz UID: ATU 36961105
This enhancement would be helpful to our development. We use the line number area and the identification area to link program changes to our change management documentation (primitive meta data). Having them colored differently would make the code easier to read.
I think this should be possible by using an injection grammar extension that enhanced the default grammar included in Z Open Editor : a « left » (?) grammar anchored on sequence area meta or identification area meta. So, the default grammar should have these metas.
Injection grammar extension can also handle « Report Writer » language extension.
https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#injection-grammars
Solved since ZOE 3.0.x
Description of the enhancement requested
Currently the textmate grammar used for COBOL treats the source line globally.
The consequence of this is to color the identification zone identically to the syntactic element which precedes this zone. In the same way, the line number zone is interpreted (wrongly) according to its content: integer, text, keyword...
The COBOL texmate grammar should start by splitting the line into 3 parts:
The result might look like this (test on a partial COBOL grammar):
Already this would give better readability of the COBOL source code, and for example would make it possible to better identify a badly aligned identification label (shifted to the left of column 73). But it would also make it possible to prepare a future switch to free format for COBOL source lines: no more line number area or identification area, or even to be compatible with the extended format of the IBM COBOL compiler for Linux, (fixed format 252 columns).
Thanks.