Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

SimonSapin
Copy link
Contributor

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.

@alexcrichton
Copy link
Member

This looks pretty awesome, nice work on the tests and documentation!

@SimonSapin
Copy link
Contributor Author

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 {
Copy link
Member

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...?)

@SimonSapin
Copy link
Contributor Author

@alexcrichton r?

@alexcrichton
Copy link
Member

Looks good to me, thanks! With a rebase I'll r+

@SimonSapin
Copy link
Contributor Author

@alexcrichton Squashed and rebased.

bors added a commit that referenced this pull request Jun 18, 2014
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.
@bors bors closed this Jun 18, 2014
@SimonSapin SimonSapin deleted the byte-literals branch June 18, 2014 05:53
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants