Repository navigation
Fix places where grammar.md doesn't match the parser - #635
Open
qodelicious wants to merge 2 commits into
Open
qodelicious wants to merge 2 commits into
qodelicious wants to merge 2 commits into
Conversation
juntyr
reviewed
Oct 21, 2026
|
|
||
| ```ebnf | ||
| char = "'", (no_apostrophe | "\\\\" | "\\'"), "'"; | ||
| char = "'", (no_apostrophe_or_backslash | char_escape), "'"; |
Member
There was a problem hiding this comment.
Where are no_double_quotation_marks_or_backslash or no_apostrophe_or_backslash defined? If they aren't yet, they should be given an explicit rule similar to nested_block_comment
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #614
Updates
docs/grammar.mdso it matches what the parser actually accepts. I checked each case againstDeserializer::from_str+IgnoredAny+end()on master.\always starts an escape, so"a\c"is rejected. The plain character class now excludes the backslash too.\u{41}works and\u0041doesn't. Also added a note that it takes 1 to 6 hex digits and has to be a valid scalar value.'\n','\x41','\u{41}'all parse), just without line continuations, and a\xescape in a char has to be ASCII...or..=(1 .. 2and.. 5are rejected), so I dropped thewsfrom those rules.#![enable(...)], soRONnow starts withws.I left out the bare
'''char and the1e_+0exponent cases from the issue, since they look more like parser quirks than something the grammar should promise.CHANGELOG.md