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

[epics-msi-substitution] does not support '-' in macro name #17

Open
vnadot opened this issue Aug 25, 2023 · 0 comments
Open

[epics-msi-substitution] does not support '-' in macro name #17

vnadot opened this issue Aug 25, 2023 · 0 comments

Comments

@vnadot
Copy link
Collaborator

vnadot commented Aug 25, 2023

lines:

file x.template {
    pattern {P              BPM-1}
            {"${P_GSCAN}"   myNickname1}
            {"${P_GSCAN}"   myNickname2}

}

tree-sitter-epics output:

$ tree-sitter parse --stat --scope source.epics.msi_substitution test.sub
(source_file [0, 0] - [5, 1]
  (db_template [0, 0] - [5, 1]
    file: (string [0, 5] - [0, 15])
    (substitutions [0, 16] - [5, 1]
      (pattern [1, 4] - [3, 51]
        (pattern_variables [1, 12] - [1, 34]
          (identifier [1, 13] - [1, 14])
          (identifier [1, 28] - [1, 31])
          (ERROR [1, 31] - [1, 33]
            (ERROR [1, 31] - [1, 33])))
        (pattern_values [2, 12] - [2, 51]
          (string [2, 13] - [2, 25]
            (quoted_string [2, 13] - [2, 25]
              (macro_expansion [2, 14] - [2, 24])))
          (string [2, 28] - [2, 50]))
        (pattern_values [3, 12] - [3, 51]
          (string [3, 13] - [3, 25]
            (quoted_string [3, 13] - [3, 25]
              (macro_expansion [3, 14] - [3, 24])))
          (string [3, 28] - [3, 50]))))))
test.sub	0 ms	(ERROR [1, 31] - [1, 33])
Total parses: 1; successful parses: 0; failed parses: 1; success percentage: 0.00%

fix: remove '-' character in macro name (BPM-1)

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

No branches or pull requests

1 participant