Skip to content

Refactor magic numbers in token.rs #9768

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

Merged
merged 1 commit into from
Oct 8, 2013

Conversation

pnkfelix
Copy link
Member

@pnkfelix pnkfelix commented Oct 8, 2013

r? anyone

Add bindings for start and ends of keyword ranges; use bindings in match arms.

Also, fixed latent bug that inspired this change: the pattern in is_any_keyword had not been updated to match the new range of reserved keyword identifiers.

(I briefly tried to expose the latent bug, but is_any_keyword is currently only called in contexts where a failure of this kind merely causes a bit more fruitless compilation before check_reserved_keywords is called by the parser, which correctly tags sizeof as reserved.)

bors added a commit that referenced this pull request Oct 8, 2013
r? anyone

Add bindings for start and ends of keyword ranges; use bindings in match arms.

Also, fixed latent bug that inspired this change: the pattern in `is_any_keyword` had not been updated to match the new range of reserved keyword identifiers.

(I briefly tried to expose the latent bug, but `is_any_keyword` is currently only called in contexts where a failure of this kind merely causes a bit more fruitless compilation before `check_reserved_keywords` is called by the parser, which correctly tags `sizeof` as reserved.)
@bors bors closed this Oct 8, 2013
@bors bors merged commit 580adc9 into rust-lang:master Oct 8, 2013
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.

3 participants