Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/expr_ext.rs')
| -rw-r--r-- | crates/syntax/src/ast/expr_ext.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/expr_ext.rs b/crates/syntax/src/ast/expr_ext.rs index 4598066bc9..1c40de1e60 100644 --- a/crates/syntax/src/ast/expr_ext.rs +++ b/crates/syntax/src/ast/expr_ext.rs @@ -77,6 +77,11 @@ impl ast::Expr { } // Don't skip subtree since we want to process the expression child next Some(ast::Stmt::ExprStmt(_)) => (), + // This might be an expression + Some(ast::Stmt::Item(ast::Item::MacroCall(mcall))) => { + cb(WalkEvent::Enter(ast::Expr::MacroCall(mcall))); + preorder.skip_subtree(); + } // skip inner items which might have their own expressions Some(ast::Stmt::Item(_)) => preorder.skip_subtree(), None => { |