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

Allow match after Prefix with max count #256

Merged

Conversation

oskarek
Copy link
Contributor

@oskarek oskarek commented Oct 22, 2022

The printing for the Prefix ParserPrinter fails whenever it detects that the next element printed matches its predicate. However, this should be allowed in the special case that the parser has a maximum count, and the value to print has exactly that count. This is because that would have stopped the parsing before the next element, regardless of whether it matches the predicate or not.

Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Thanks for taking the time to PR and test!

@stephencelis stephencelis merged commit 2c7dec7 into pointfreeco:main Oct 24, 2022
@oskarek oskarek deleted the fix-prefix-with-max-count-printing branch October 24, 2022 20:47
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

2 participants