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

Ignore whitespace, either by default or setting #39

Closed
scott-mcdonald opened this issue May 22, 2019 · 2 comments
Closed

Ignore whitespace, either by default or setting #39

scott-mcdonald opened this issue May 22, 2019 · 2 comments

Comments

@scott-mcdonald
Copy link

I have been finding it arduous to constantly add SkipWhitespaces with Before or Between methods for various parsers. Does it make sense to have char based parsing automatically ignore whitespace or by setting to simplify parser creation?

@benjamin-hodgson
Copy link
Owner

I don't think this is something that should be built in to the library. You can always factor out repetitive code into a method.

Parser<char, T> BetweenWhitespace<T>(Parser<char, T> p) => p.Between(SkipWhitespaces);

@todaysfate
Copy link

todaysfate commented Jul 12, 2019 via email

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

No branches or pull requests

3 participants