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

Fix error message of notFollowedBy parser #1134

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

StefanBertels
Copy link
Contributor

  1. [BUG] Tests shows that notFollowedBy reports wrong position. Fixed.
  2. notFollowedBy did output result of p. This might be something different than input string and therefore might hide the problem. As label is not available I think it is a better approach to output the problematic part of the input string (at least if something was consumed).
  3. The new version will allow parsers that don't consume anything like eof. Might be rare but why not support notFollowedBy(eof) or parsers that are decorated with lookahead etc.

Notes:
I tried handling all cases of ParserResult state correctly, but I'm not sure -- especially about the last case.

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.

None yet

1 participant