-
Notifications
You must be signed in to change notification settings - Fork 1
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
Syntax Errors Result in Assertions Being Ignored #14
Comments
Basically you need a heuristic to distinguish between "irrelevant input" and "malformed" input. I can think of a few things may be combined to create such a heuristic.
|
@bd82 Yeah, I was thinking of just throwing different errors if the parser at least found a position token (using a boolean). Then the parser can either ignore if no position was found or complain if it looked partially valid. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've run into this a few times where either an actual parser bug or a typo has caused the assertion to fail parsing. Because this syntax format uses existing comment delimiters, it must assume anything that doesn't parse is still valid syntax in the original grammar and pass it through unchanged.
This leads to confusion from either: assertion tests being treated as source grammar, or worse, tests being ignored since they're just irrelevant comments, creating a false sense of assurance.
Figure out how to determine when the line is an assertion even if it has parsing errors and complain loudly rather than silently ignoring.
The text was updated successfully, but these errors were encountered: