-
Notifications
You must be signed in to change notification settings - Fork 602
Add line/column information consistently to every parser message. #179
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
Comments
I agree with this goal, and location-aware errors from Note that currently the tokenizer and the parser do two independent passes (with the tokenizer returning a I think there are two tasks here:
|
Sounds great! The first indeed is the more low hanging fruit I meant with this story ( |
Addresses https://github.com/andygrove/sqlparser-rs/issues/179 for tokenize errors
@nickolay I saw that in the fork of Materialize column / line indexes are supported.
I think this should be relatively simply to implement on the current version, compared to the lossless syntax (although it doesn't address the comment handling, lossless parsing). What do you think? |
The source range (or rather the corresponding string) is needed for the Lossless Syntax Tree as well. I used Since the LST needs a data-less Materialize instead returns |
It would be useful to have clear parser errors which have the position (line and column) printed.
Now for some errors there is information of where the error happened:
Unterminated string literal at Line: {}, Col: {}
For others, there isn't:
Unexpected EOF while in a multi-line comment
I think this would be a "good first issue" to work on, maybe I find some time to work on this soon.
The text was updated successfully, but these errors were encountered: