Skip to content
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 - Support for comment in SQL statements #401

Open
FALLAI-Denis opened this issue Apr 10, 2024 · 4 comments
Open

COBOL textmate - Support for comment in SQL statements #401

FALLAI-Denis opened this issue Apr 10, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@FALLAI-Denis
Copy link

Description of the enhancement requested

Hi,

We would like the texmate COBOL grammar manage comments included in SQL statements.

COBOL code in IBM Z Open Editor:
image

SQL code in IBM Db2 for z/OS Developer:
image

Thanks.

@FALLAI-Denis
Copy link
Author

FALLAI-Denis commented Apr 11, 2024

@FALLAI-Denis
Copy link
Author

This rule could work without the problem described in issue #402:

    {
      "begin": "(?i:exec\\s+sql)",
      "name": "string.quoted.cobol.sql",
      "patterns": [
        {
          "match": "(\\:([0-9a-zA-Z\\-_])*)",
          "name": "variable.cobol"
        },
        {
          "match": "(--.*)",
          "name": "comment.line.modern"
        },
        {
          "include": "source.sql"
        }
      ],
      "end": "(?i:end\\-exec)",
      "endCaptures": "string.quoted.cobol.sql"
    },

@FALLAI-Denis
Copy link
Author

FALLAI-Denis commented Apr 12, 2024

PS: rule for SQL comment is not mandatory if problem describe in #402 was solved, « source.sql » apply rule for SQL comment.

But COBOL floating comment « *> » should be managed in SQL comment.

Question: which extension(s) manage « source.sql »? For my tests on textmate improvement I desactivate « IBM Db2 for z/os developer » and SQL statement still managed…

@sdaimwood sdaimwood added the enhancement New feature or request label Apr 15, 2024
@RedCMD
Copy link

RedCMD commented May 7, 2024

that's not how "endCaptures" work
it should be "endCaptures": { "0": { "name": "string.quoted.cobol.sql" } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants