Skip to content

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
@SethTisue SethTisue marked this pull request as draft April 5, 2023 11:33
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