-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COBOL textmate - the begin/end rules no longer work since the management of the line number and identification zones was added #402
Comments
Related issue: |
Hi, I think that to resolve this problem we need to review the organization of the rules in the cobol.json file:
Blocks are:
Implementing "Division" blocks give capacity to implements fine grain rules:
Blocks can be:
Also consider "bad formed" blocks: missing end pattern in source text, so perhaps "begin" / "while" should be privilegied. This means declaring a repository of named rules and referencing these named rules according to the sequence indicated above. I am currently working on such an implementation and will come back here to share my work. Difficulty is to isolate active tokens in begin / end / while rules (deal with commented tokens): trying to implement lookhead / lookbehind regex for this. |
Hi @FALLAI-Denis, thank you for investigating this. Please do keep us updated on your findings. Will mark this and #401 as enhancements for now and investigate what we can do as well. |
Development environment used
Problem Description
The begin/end rules no longer work since the management of the line number and identification zones was added.
This is due to the addition of the following rule at the start of the textmate grammar:
It has the effect of isolating the text in columns 7 to 72 and it is on this isolated text that the other rules are applied, therefore the rules based on begin / end (or while / end).
If this rule is disabled, then begin/end based rules work.
This impacts the management of multi-line EXEC xxx/END-EXEC sequences.
Observed behavior
Expected behavior
With additional management of line number and identification zones.
The text was updated successfully, but these errors were encountered: