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

Fixes an ambiguity with identifiers and keywords. #32

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

almann
Copy link
Contributor

@almann almann commented Jun 4, 2021

Previously, SELECTY would be parsed as keyword SELECT identifier
Y. This fixes the negative look-ahead assertion for keywords to
make sure a non-quoted identifier character follows and similarly
adds a look-ahead assertion for the prefix of identifiers to not be
keywords (which includes the previous assertion).

Also fixes a unit test name.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Previously, `SELECTY` would be parsed as keyword `SELECT` identifier
`Y`.  This fixes the negative look-ahead assertion for keywords to
make sure a non-quoted identifier character follows and similarly
adds a look-ahead assertion for the prefix of identifiers to not be
keywords (which includes the previous assertion).

Also fixes a unit test name for identifiers.
@almann almann requested review from marcbowes and alancai98 June 4, 2021 05:23
@codecov
Copy link

codecov bot commented Jun 4, 2021

Codecov Report

Merging #32 (7f9f335) into main (d257e3e) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
+ Coverage   90.60%   90.66%   +0.05%     
==========================================
  Files           7        7              
  Lines         479      482       +3     
==========================================
+ Hits          434      437       +3     
  Misses         45       45              
Impacted Files Coverage Δ
partiql-parser/src/scanner.rs 95.12% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d257e3e...7f9f335. Read the comment docs.

@almann almann merged commit e08a7cf into partiql:main Jun 4, 2021
@almann almann deleted the ident-fix branch June 4, 2021 05:42
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.

2 participants