Skip to content

Conversation

@alexcrichton
Copy link
Member

This ended up passing through the lexer but dying later on in parsing when it
wasn't handled. The strategy taken was to copy the str_lit funciton, but adapt
it for bytes.

Closes #16278

@lilyball
Copy link
Contributor

lilyball commented Aug 5, 2014

str_lit also handles a \r that's not backslash-prefixed. I don't see that in binary_lit. How does it behave if you embed a raw \r or a \r\n sequence in a byte string literal?

@alexcrichton
Copy link
Member Author

Added a clause for that and updated the test as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be perhaps a bit cleaner if this if-elseif-else is made into a match.

@lilyball
Copy link
Contributor

lilyball commented Aug 5, 2014

r=me with comments addressed.

This ended up passing through the lexer but dying later on in parsing when it
wasn't handled. The strategy taken was to copy the `str_lit` funciton, but adapt
it for bytes.

Closes rust-lang#16278
@bors bors merged commit 74ae05a into rust-lang:master Aug 6, 2014
@alexcrichton alexcrichton deleted the issue-16728 branch August 6, 2014 21:26
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.

ICE: indexes do not lie on character boundaries with byte literal and \r\n

3 participants