Attach tokens to ast::Stmt

We currently only attach tokens when parsing a `:stmt` matcher for a
`macro_rules!` macro. Proc-macro attributes on statements are still
unstable, and need additional work.
This commit is contained in:
Aaron Hill
2020-09-10 16:59:30 -04:00
parent c1011165e6
commit 156ef2bee8
11 changed files with 56 additions and 15 deletions

View File

@@ -415,7 +415,7 @@ impl<'a> Parser<'a> {
}
pub(super) fn mk_stmt(&self, span: Span, kind: StmtKind) -> Stmt {
Stmt { id: DUMMY_NODE_ID, kind, span }
Stmt { id: DUMMY_NODE_ID, kind, span, tokens: None }
}
fn mk_stmt_err(&self, span: Span) -> Stmt {