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

Provide expected symbols in case of syntax error #24

Open
metthal opened this issue Jul 28, 2020 · 0 comments
Open

Provide expected symbols in case of syntax error #24

metthal opened this issue Jul 28, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@metthal
Copy link
Owner

metthal commented Jul 28, 2020

As of right now, pog raises an exception in case of syntax error. It takes all symbols that are expected on the input in the particular parsing state it is in at the moment and serializes it into the string of parser error. So you'll get something like unexpected symbol <XYZ>, expected one of <A>, <B>, <C>, ....

It would be proficient for users of pog to have these expected symbols available for the purpose of building language servers. Instead of raising an exception, please return something like ParsingResult object which would contain all of these and would essentially bear the same information as the exception in case of syntax error.

@metthal metthal added the enhancement New feature or request label Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant