Skip to content

Slightly better parse errors#702

Merged
marcoeilers merged 2 commits into
masterfrom
meilers_better_parse_errors
May 17, 2023
Merged

Slightly better parse errors#702
marcoeilers merged 2 commits into
masterfrom
meilers_better_parse_errors

Conversation

@marcoeilers

Copy link
Copy Markdown
Contributor
  • Extracting only the relevant information from FastParse (i.e., what was expected at the point where parsing fails), instead of the whole (?) rule tree
  • Renaming some parse rules, since they can be shown in the error message
  • Removing an "Expected" that was in the message twice.

Before:

  [0] Parse error: Expected Expected entireProgram:1:1 / programDecl:4:1 / ("(" ~ exp.rep(0) ~ ")" | ":=" | "," | ";" | stmt | "}"):473:29, found "(vwa cd,nu" (test.vpr@473.29)

After:

  [0] Parse error: Expected ("(" ~ exp.rep(0) ~ ")" | ":=" | "," | ";" | stmt | "}"):473:29, found "(vwa cd,nu" (test.vpr@473.29)

@marcoeilers marcoeilers merged commit c352aa5 into master May 17, 2023
@marcoeilers marcoeilers deleted the meilers_better_parse_errors branch May 17, 2023 16:14
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

Successfully merging this pull request may close these issues.

1 participant