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

Lex binary and octal literals more eagerly. #23872

Merged
merged 1 commit into from
Apr 1, 2015

Conversation

huonw
Copy link
Member

@huonw huonw commented Mar 30, 2015

Previously 0b12 was considered two tokens, 0b1 and 2, as 2 isn't a valid
base 2 digit. This patch changes that to collapse them into one (and
makes 0b12 etc. an error: 2 isn't a valid base 2 digit).

This may break some macro invocations of macros with tt (or syntax
extensions) that rely on adjacent digits being separate tokens and hence
is a

[breaking-change]

The fix is to separate the tokens, e.g. 0b12 -> 0b1 2.

cc rust-lang/rfcs#879

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

Previously 0b12 was considered two tokens, 0b1 and 2, as 2 isn't a valid
base 2 digit. This patch changes that to collapse them into one (and
makes `0b12` etc. an error: 2 isn't a valid base 2 digit).

This may break some macro invocations of macros with `tt` (or syntax
extensions) that rely on adjacent digits being separate tokens and hence
is a

[breaking-change]

The fix is to separate the tokens, e.g. `0b12` -> `0b1 2`.

cc rust-lang/rfcs#879
@nikomatsakis
Copy link
Contributor

@bors r_ 606f50c

@nikomatsakis
Copy link
Contributor

@bors r 606f50c

@bors
Copy link
Contributor

bors commented Mar 31, 2015

☔ The latest upstream changes (presumably #23549) made this pull request unmergeable. Please resolve the merge conflicts.

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 31, 2015
Conflicts:
	src/libsyntax/parse/lexer/mod.rs
@bors bors merged commit 606f50c into rust-lang:master Apr 1, 2015
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