do_inner_attrs (e);
}
+void
+Dump::do_ifexpr (IfExpr &e)
+{
+ do_expr (e);
+ visit_field ("condition", e.get_if_condition ());
+ visit_field ("if_block", e.get_if_block ());
+}
+
void
Dump::do_expr (Expr &e)
{
}
void
-Dump::visit (IfExpr &if_expr)
+Dump::visit (IfExpr &e)
{
begin ("IfExpr");
- begin ("condition");
-
- if_expr.vis_if_condition (*this);
- end ("condition");
-
- begin ("if_block");
- if_expr.vis_if_block (*this);
- end ("if_block");
-
+ do_ifexpr (e);
end ("IfExpr");
}
Dump::visit (IfExprConseqElse &e)
{
begin ("IfExprConseqElse");
-
- begin ("condition");
- e.vis_if_condition (*this);
- end ("condition");
-
- begin ("if_block");
- e.vis_if_block (*this);
- end ("if_block");
-
- begin ("else_block");
- e.vis_else_block (*this);
- end ("else_block");
+ do_ifexpr (e);
+ visit_field ("else_block", e.get_else_block ());
end ("IfExprConseqElse");
}
void do_item (Item &);
void do_type (Type &);
void do_expr (Expr &);
+ void do_ifexpr (IfExpr &);
void do_ifletexpr (IfLetExpr &);
void do_pathexpr (PathExpr &);
void do_pathpattern (PathPattern &);