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

Feature request: Option to use tags to improve error messages #963

Open
rscarson opened this issue Jan 8, 2024 · 0 comments
Open

Feature request: Option to use tags to improve error messages #963

rscarson opened this issue Jan 8, 2024 · 0 comments

Comments

@rscarson
Copy link

rscarson commented Jan 8, 2024

In my grammar I have this rule:

MATCHING_EXPRESSION = {
    RANGE_EXPRESSION ~ (MATCHING_OPERATOR ~ #pattern = MATCHING_EXPRESSION_PATTERN)?
}

For the expression 'test' matches , that is one with a missing pattern, we get:

  |
1 | 'test' matches
  |               ^---
  |
  = expected DELETE_EXPRESSION

If the tag was leveraged we could instead get:

  |
1 | 'test' matches
  |               ^---
  |
  = expected pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants