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

Position of syntax error in parsed string #247

Open
bscbrn opened this issue Mar 10, 2021 · 1 comment
Open

Position of syntax error in parsed string #247

bscbrn opened this issue Mar 10, 2021 · 1 comment

Comments

@bscbrn
Copy link

bscbrn commented Mar 10, 2021

Hi,
I am looking for a way to get some syntax error information from the parser in case there is any.

Something like the position of the offending character or token in the parsed expression string could be enough.

Is there anything I could use?

Thank you

@silentmatt
Copy link
Owner

Certain types of syntax errors include the character position in the error message, but it's not consistent. That could definitely use some work, maybe including using a custom Error sub-class that includes position properties instead of just a string.

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