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

Improve error messages #89

Open
otac0n opened this issue Nov 11, 2016 · 2 comments
Open

Improve error messages #89

otac0n opened this issue Nov 11, 2016 · 2 comments

Comments

@otac0n
Copy link
Owner

otac0n commented Nov 11, 2016

Pegasus grammars and Pegasus itself could benefit from a better attempt at reasonable error messages. Pegasus has quite a few hints that could be used to form reasonable heuristics.

@ShaunMcGuile
Copy link

Hi, is the error message enhancement still in progress?
Has there been any discussion?
How would one add the [Data(cursor)] to a returned error message to give the position of the error?

@otac0n
Copy link
Owner Author

otac0n commented Aug 9, 2019

Hi @ShaunMcGuile, this isn't really in progress as there hasn't been much discussion.

You should be able to extract the cursor position from any FormatException thrown by the parser. For example, see:

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

2 participants