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

A proposed new interface for skipping characters automatically #464

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peteraldous
Copy link

I implemented this new interface for Scanners but haven't yet implemented it for RegexParsers; implementing it in the obvious way for RegexParsers would create performance issues (likely making a linear process quadratic). Instead, I've pushed this to start a discussion about whether this interface is something the maintainers would like to see implemented.

The term whitespace is being used somewhat generously here; comments are not whitespace but are skipped, just as whitespace is. I renamed the apply method to parse so that apply could be called as before but that the desired skipping behavior would occur throughout. This has the added benefit of adding explicit meaning to the parse method, which subclasses will implement.

This PR begins to address #320 and #25

…emented for Scanners but not yet for RegexParsers
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