diff options
Diffstat (limited to 'gcc/rust/expand/rust-macro-expand.h')
-rw-r--r-- | gcc/rust/expand/rust-macro-expand.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/rust/expand/rust-macro-expand.h b/gcc/rust/expand/rust-macro-expand.h index 4efcd7b..0d0282e 100644 --- a/gcc/rust/expand/rust-macro-expand.h +++ b/gcc/rust/expand/rust-macro-expand.h @@ -287,11 +287,18 @@ struct MacroExpander expanded_fragment = std::move (fragment); } - AST::ASTFragment take_expanded_fragment () + AST::ASTFragment take_expanded_fragment (AST::ASTVisitor &vis) { AST::ASTFragment old_fragment = std::move (expanded_fragment); expanded_fragment = AST::ASTFragment::create_empty (); + for (auto &node : old_fragment.get_nodes ()) + { + expansion_depth++; + node.accept_vis (vis); + expansion_depth--; + } + return old_fragment; } |