Skip to content

Cleanup and followup to PR #17830: parsing changes #19430

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 7, 2015

Conversation

pczarn
Copy link
Contributor

@pczarn pczarn commented Nov 30, 2014

Followup to PR #17830. Prevents breaking down unquoted $name tokens into separate $ and name.
Reports unknown macro variables (with correct span).

Fixes #18775 (finally...)
Fixes #18839
Fixes #15640

// continue by trying to parse the `:ident` after `$name`
if self.token == token::Colon && self.look_ahead(1, |t| t.is_ident() &&
!t.is_strict_keyword() &&
!t.is_reserved_keyword()) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these two checks fix #18775

@alexcrichton
Copy link
Member

r? @pnkfelix

@pczarn pczarn force-pushed the interp_tt-cleanup branch 2 times, most recently from 8f5bfaa to 02d60f4 Compare December 10, 2014 14:36
@Gankra
Copy link
Contributor

Gankra commented Jan 2, 2015

Needs a rebase...

And an actual reviewer 😞

@pczarn pczarn force-pushed the interp_tt-cleanup branch from f3f1a47 to cadb136 Compare January 2, 2015 22:00
@pczarn
Copy link
Contributor Author

pczarn commented Jan 2, 2015

Rebased, updated the reference. Still waiting for review

@emberian
Copy link
Member

emberian commented Jan 5, 2015

r=me with a rebase.

@emberian
Copy link
Member

emberian commented Jan 5, 2015

Actually, should wait for macro reform to land first.

@pczarn pczarn force-pushed the interp_tt-cleanup branch 2 times, most recently from 26046d9 to 4ffa69f Compare January 6, 2015 18:34
Prevents breaking down `$name` tokens into separate `$` and `name`.
Reports unknown macro variables.

Fixes rust-lang#18775
Fixes rust-lang#18839
Fixes rust-lang#15640
@pczarn pczarn force-pushed the interp_tt-cleanup branch from 191c80b to d85c017 Compare January 6, 2015 23:26
@pczarn
Copy link
Contributor Author

pczarn commented Jan 6, 2015

@cmr Tested, pushed with some changes

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jan 7, 2015
Conflicts:
	src/libsyntax/parse/parser.rs
@alexcrichton alexcrichton merged commit d85c017 into rust-lang:master Jan 7, 2015
@pczarn pczarn deleted the interp_tt-cleanup branch January 14, 2015 16:55
lnicola pushed a commit to lnicola/rust that referenced this pull request Apr 28, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
5 participants