1
Fork 0

Resurrecting #33135

Started rebasing @sgrif's PR #33135 off of current master. (Well, actually merging it into a new branch based off current master.)

The following files still need to be fixed or at least reviewed:

- `src/libsyntax/ext/tt/macro_parser.rs`: calls `Parser::parse_lifetime`, which doesn't exist anymore
- `src/libsyntax/parse/parser.rs`: @sgrif added an error message to `Parser::parse_lifetime`. Code has since been refactored, so I just took it out for now.
- `src/libsyntax/ext/tt/transcribe.rs`: This code has been refactored bigtime. Not sure whether @sgrif's changes here are still necessary. Took it out for this commit.
This commit is contained in:
Michael Hewson 2017-05-10 00:30:47 +00:00 committed by Matt Peterson
parent 4352c11dd0
commit 03a51019a4
9 changed files with 89 additions and 7 deletions

View file

@ -603,6 +603,7 @@ fn parse_nt<'a>(p: &mut Parser<'a>, sp: Span, name: &str) -> Nonterminal {
"path" => token::NtPath(panictry!(p.parse_path_common(PathStyle::Type, false))),
"meta" => token::NtMeta(panictry!(p.parse_meta_item())),
"vis" => token::NtVis(panictry!(p.parse_visibility(true))),
"lifetime" => token::NtLifetime(panictry!(p.parse_lifetime())),
// this is not supposed to happen, since it has been checked
// when compiling the macro.
_ => p.span_bug(sp, "invalid fragment specifier")