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:
@@ -400,6 +400,7 @@ macro_rules! make_stmts_default {
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
span: e.span,
|
||||
kind: ast::StmtKind::Expr(e),
|
||||
tokens: None
|
||||
}]
|
||||
})
|
||||
};
|
||||
@@ -642,6 +643,7 @@ impl MacResult for DummyResult {
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
kind: ast::StmtKind::Expr(DummyResult::raw_expr(self.span, self.is_error)),
|
||||
span: self.span,
|
||||
tokens: None
|
||||
}])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user