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

feat: add method to get current parsing index #728

Merged
merged 1 commit into from Nov 30, 2022

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Nov 28, 2022

We need to know where the invalid token is so that we can highlight it, and probably color the word or the clause to make it more obvious what's wrong. It'd be better as a higher-level utility than as part of the parser, so I expose the index field.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 3561450613

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 86.344%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/parser.rs 0 2 0.0%
Totals Coverage Status
Change from base Build 3558202800: -0.01%
Covered Lines: 11874
Relevant Lines: 13752

💛 - Coveralls

@alamb
Copy link
Collaborator

alamb commented Nov 30, 2022

Thanks @neverchanje

@alamb alamb merged commit 7101e00 into sqlparser-rs:main Nov 30, 2022
@alamb
Copy link
Collaborator

alamb commented Nov 30, 2022

@neverchanje what project are you working on ? There have been several requests over time for more support to show where the tokens came from -- e.g. #710 from @ankrgyl

@ankrgyl
Copy link
Contributor

ankrgyl commented Nov 30, 2022

@alamb FWIW I had to do the same for the project I'm working on (although did not include it in #710).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants