Fix issue 288 - Lexer fails to detect "*" as a wildcard. #289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #288.
Process is that after the Lexer does his work and created a list of tokens, and before returning back this list, it parses that list in order to change some flags for the
*
operator.Doing this by the lexer because it's his job, but it would be too complicated and heavier in performance to directly detect the good flag for this operator. So the job of solving their ambiguity is done later, when the token list is created.
Lots of tests have been updated and 2 new providers came: first to check each case where operator
*
is arithmetic (all flags must be1
), and second to check each case where operator*
is a wildcard (all flags must be16
).In those new providers, some tests are not performed beause of a bug related in #287 because of
*/*
string found. Once the PR fixing #287 merged into the good branches, one can just uncomment those tests.If you feel to add more tests, please do so or tell me what do you want to test.
Finally, If that way of processing is OK for you guys, I think it can also solve the flag ambiguity of
=
(WHERE foo = bar
!=@i = 0
) using the same process.Thanks a lot, and have a good review!
EDIT: Oh and, this time, @williamdes I did see to start from branch QA, so no cherry-pick to do ;).