Skip to content

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

@rscarson

Description

@rscarson

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions