-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add byte, byte string, and raw byte string literals. #14880
Conversation
This looks pretty awesome, nice work on the tests and documentation! |
Pushed some fixup commits that I’d like to squash before this is sent to bors. (Kept separated for now for easier review.) |
let mut c2 = self_.curr.unwrap_or('\x00'); | ||
self_.bump(); | ||
|
||
match c2 { |
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.
This is very very similar to the match
for parsing a normal '
, could they be factored to share the code? (I think the only real difference is if they accept \u..
, \U...
?)
Looks good to me, thanks! With a rebase I'll r+ |
Move into a new syntax::parse::lexer::StringReader method the code that was almost duplicated for parsing backslash-escapes in byte, byte string, char, and string literals.
@alexcrichton Squashed and rebased. |
The change is a result of the char/string parsing refactor.
See #14646 (tracking issue) and rust-lang/rfcs#69. This does not close the tracking issue, as the `bytes!()` macro still needs to be removed. It will be later, after a snapshot is made with the changes in this PR, so that the new syntax can be used when bootstrapping the compiler.
Remove double lookups from Interned
See #14646 (tracking issue) and rust-lang/rfcs#69.
This does not close the tracking issue, as the
bytes!()
macro still needs to be removed. It will be later, after a snapshot is made with the changes in this PR, so that the new syntax can be used when bootstrapping the compiler.