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

Add option to avoid automatic consumption of new-lines by lexemes #5

Closed
mrkkrp opened this issue Jul 30, 2015 · 1 comment
Closed
Milestone

Comments

@mrkkrp
Copy link
Owner

mrkkrp commented Jul 30, 2015

See haskell/parsec#24 for more information. I wonder if haskell/parsec#41 can be helpful?

@mrkkrp
Copy link
Owner Author

mrkkrp commented Sep 2, 2015

The problem is solved in ded90fd. I've chosen to give more control to the user. This also make it more difficult to write parsers, but eliminates the need to rewrite entire Text.Megaparsec.Lexer module every time user needs to do something non-standard.

More information is in commit message. I expect that makeLexer will be a lot simpler and user will need to do some parsing manually. We can also provide helper functions to construct parser that parses block comments for example, and then use the result in definition of language. It's better than the old scheme where all the logic is locked inside of makeTokenParser.

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