You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is a difference between how pest_meta and the other tools/libraries handle the ' in range expressions.
In meta/src/grammar.pest the following is a valid range expression '''..''' as there is no check for it:
And a similar rule seem to be defined for IDEs syntax highlighting.
Searching for usage the unescaped version ''' in public GitHub repositories gave no results, and some results for the escaped version '\''.
To Reproduce
Writing the following pest grammar in a file using a supported IDE or in the playground:
r={'''..'''}
Is deemed valid by Pest, the rule r matches the input ', but breaks the syntax-highlighting. Might break other things, I didn't check.
Expected behavior
I expected the behavior of the different tools listed up there to be consistent.
Additional context
I don't know if ''' being valid was a design choice that wasn't followed in the playground/ide tools, or if checking for this edge case was simply forgotten in pest meta grammar. I'm aware this "bug" doesn't have a great impact (maybe none?), but still I think it should be addressed. I'd happily submit changes to address it, just not sure if that is wanted.
The text was updated successfully, but these errors were encountered:
I don't know if ''' being valid was a design choice that wasn't followed in the playground/ide tools, or if checking for this edge case was simply forgotten in pest meta grammar.
I'd guess the latter? @dragostis@CAD97 @pest-parser/triage do you know?
Describe the bug
There is a difference between how
pest_meta
and the other tools/libraries handle the'
in range expressions.In meta/src/grammar.pest the following is a valid range expression
'''..'''
as there is no check for it:pest/meta/src/grammar.pest
Lines 167 to 179 in 7f8411a
There is no check in the meta's parser either:
pest/meta/src/parser.rs
Lines 428 to 436 in 7f8411a
Meanwhile other tools do not accept this syntax.
The highlighter for the playground has this line for handling ranges:
And a similar rule seem to be defined for IDEs syntax highlighting.
Searching for usage the unescaped version
'''
in public GitHub repositories gave no results, and some results for the escaped version'\''
.To Reproduce
Writing the following pest grammar in a file using a supported IDE or in the playground:
Is deemed valid by Pest, the rule
r
matches the input'
, but breaks the syntax-highlighting. Might break other things, I didn't check.Expected behavior
I expected the behavior of the different tools listed up there to be consistent.
Additional context
I don't know if
'''
being valid was a design choice that wasn't followed in the playground/ide tools, or if checking for this edge case was simply forgotten in pest meta grammar. I'm aware this "bug" doesn't have a great impact (maybe none?), but still I think it should be addressed. I'd happily submit changes to address it, just not sure if that is wanted.The text was updated successfully, but these errors were encountered: