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

Track consumed token count in ParserState (and ParseError) #175

Open
phadej opened this issue Sep 11, 2023 · 0 comments
Open

Track consumed token count in ParserState (and ParseError) #175

phadej opened this issue Sep 11, 2023 · 0 comments

Comments

@phadej
Copy link
Collaborator

phadej commented Sep 11, 2023

Relying on (user settable) SourcePos for deciding which parse is longer (in mergeError) is unreliable.

FWIW megaparsec tracks the count.

The #96 is different, as it adds character count to SourcePos. Yet, both changes are breaking ones, as ErrorPos "constructors" are part of public interface.

phadej added a commit that referenced this issue Sep 11, 2023
Don't compare source names when deciding "longer match"
in mergeError. #175 would be a better fix, but that would require
a major bump.
@phadej phadej mentioned this issue Sep 11, 2023
phadej added a commit that referenced this issue Sep 11, 2023
Don't compare source names when deciding "longer match"
in mergeError. #175 would be a better fix, but that would require
a major bump.
phadej added a commit that referenced this issue Sep 11, 2023
Don't compare source names when deciding "longer match"
in mergeError. #175 would be a better fix, but that would require
a major bump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant