-
Notifications
You must be signed in to change notification settings - Fork 9
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
Adds the scanner rules for punctuation #30
Conversation
Adds the Pest grammar rules for these tokens and particularly adds the lookahead assertions for the various edge cases around the punctuation tokens that interact with each other and comments. Adds special `Content` enum variants for `.`/`*`/`?` and a basic variant for `Operator` and `Delimiter`. This should the final pre-requisite for all of the terminal parse rules in the PEG and allow us to start adding the parser rules for expressions. An explicit TODO is around modeling the various operators as their own enum or enum variants, right now they are returned as normalized string content.
Codecov Report
@@ Coverage Diff @@
## main #30 +/- ##
==========================================
+ Coverage 88.97% 90.60% +1.63%
==========================================
Files 7 7
Lines 408 479 +71
==========================================
+ Hits 363 434 +71
Misses 45 45
Continue to review full report at Codecov.
|
See #31 for details on this TODO. |
Rule::Dot_ => Content::Dot, | ||
Rule::Star_ => Content::Star, | ||
Rule::Parameter => Content::Parameter, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason tests haven't been added for Dot, Star, and Parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, got so caught up in my other punctuation tests especially around potentially ambiguous cases that I forgot. will add.
Fixes ambiguity around decimal and dot.
Adds the Pest grammar rules for these tokens and particularly
adds the lookahead assertions for the various edge cases around the
punctuation tokens that interact with each other and comments.
Adds special
Content
enum variants for.
/*
/?
and a basic variantfor
Operator
andDelimiter
.This should the final pre-requisite for all of the terminal parse rules in
the PEG and allow us to start adding the parser rules for expressions.
An explicit TODO is around modeling the various operators as their own
enum or enum variants, right now they are returned as normalized string
content.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.