Attach TokenStream to ast::Block
A `Block` does not have outer attributes, so we only capture tokens when parsing a `macro_rules!` matcher
This commit is contained in:
@@ -207,7 +207,13 @@ impl<'a> ExtCtxt<'a> {
|
||||
)
|
||||
}
|
||||
pub fn block(&self, span: Span, stmts: Vec<ast::Stmt>) -> P<ast::Block> {
|
||||
P(ast::Block { stmts, id: ast::DUMMY_NODE_ID, rules: BlockCheckMode::Default, span })
|
||||
P(ast::Block {
|
||||
stmts,
|
||||
id: ast::DUMMY_NODE_ID,
|
||||
rules: BlockCheckMode::Default,
|
||||
span,
|
||||
tokens: None,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn expr(&self, span: Span, kind: ast::ExprKind) -> P<ast::Expr> {
|
||||
|
||||
Reference in New Issue
Block a user