}
void
-ExpandVisitor::expand_inner_stmts (
- AST::BlockExpr &expr, std::vector<std::unique_ptr<AST::Stmt>> &stmts)
+ExpandVisitor::expand_inner_stmts (AST::BlockExpr &expr)
{
+ auto &stmts = expr.get_statements ();
expander.push_context (MacroExpander::ContextType::STMT);
for (auto it = stmts.begin (); it != stmts.end (); it++)
void
ExpandVisitor::visit (AST::BlockExpr &expr)
{
- expand_inner_stmts (expr, expr.get_statements ());
+ expand_inner_stmts (expr);
expand_tail_expr (expr, expander);
if (expr.has_tail_expr ())
* @param values Vector of values to mutate in-place and append into
*/
void expand_inner_items (std::vector<std::unique_ptr<AST::Item>> &values);
- void expand_inner_stmts (AST::BlockExpr &expr,
- std::vector<std::unique_ptr<AST::Stmt>> &values);
+ void expand_inner_stmts (AST::BlockExpr &expr);
// TODO: See if possible to make more specialization for Impl items, Block
// stmts etc? This could allow us to remove expand_macro_children or at least