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:
parent
ad3a6f70ac
commit
de4bd9f0f8
8 changed files with 21 additions and 4 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue