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

Parser error in some valid label names #15

Closed
dansalvato opened this issue Jan 9, 2024 · 0 comments
Closed

Parser error in some valid label names #15

dansalvato opened this issue Jan 9, 2024 · 0 comments

Comments

@dansalvato
Copy link
Contributor

In this code snippet:

ATKPARAM      MACRO
atk\<REPTN>_\1: rs.b       \2
              ENDM

The label name is valid, but the parser reports an error. When auto-formatting, the formatter inserts a colon after the underscore, which seems to indicate it thinks the label ends after the underscore but before the \1.

It seems any label name containing some characters, then a macro parameter, then an underscore, then another macro parameter, causes the parser error.

More tests/examples on label names:

something\1_\2 errors.

\1\1_\2 errors.

\1_\2 does not error.

grahambates added a commit to grahambates/tree-sitter-m68k that referenced this issue Jun 27, 2024
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