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.
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
Support octal and hex within regex character class pattern #11112
Support octal and hex within regex character class pattern #11112
Changes from all commits
2356a8d
dcaf31d
e21127e
21d2424
87db8fd
f8557b1
a2214e4
7f6b086
d2c1620
ae70e0b
5e18b18
0eea718
b8d58c9
20e88fa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
My prior belief was that a prefix of
\0
was required to denote octals in a string, just like\x
is needed to denote hexadecimals. However, I was wrong. Python, C++, and Java do not require a\0
prefix, so this implementation appears to be aligned with all the octal conventions we care about. TIL.See also:
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.
Of note, Python supports three-digit octals that exceed one byte.
\777
maps to character 511'ǿ'
. C++ does not allow this.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.
Everything after this point in this file is just a reformat (shift-left) by clang-format as a result of the if-else removal above.
Using the Hide whitespace github PR review feature can help here.