Remove some unnecessary indirection from AST structures
This commit is contained in:
parent
aa1dc0975a
commit
77cc5764b9
23 changed files with 271 additions and 254 deletions
|
@ -523,7 +523,7 @@ pub fn parse_nt<'a>(p: &mut Parser<'a>, sp: Span, name: &str) -> Nonterminal {
|
|||
},
|
||||
"block" => token::NtBlock(panictry!(p.parse_block())),
|
||||
"stmt" => match panictry!(p.parse_stmt()) {
|
||||
Some(s) => token::NtStmt(s),
|
||||
Some(s) => token::NtStmt(P(s)),
|
||||
None => {
|
||||
p.fatal("expected a statement").emit();
|
||||
panic!(FatalError);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue