gccrs: ast: dump If expressions

gcc/rust/ChangeLog:

	* ast/rust-ast-dump.cc (Dump::visit): Implement visitor for If
	expressions.
This commit is contained in:
David Faust
2022-10-05 10:11:38 -07:00
committed by Arthur Cohen
parent 980bd25e25
commit aeed747093

View File

@@ -534,15 +534,31 @@ Dump::visit (ForLoopExpr &expr)
void
Dump::visit (IfExpr &expr)
{}
{
stream << "if ";
expr.vis_if_condition (*this);
expr.vis_if_block (*this);
}
void
Dump::visit (IfExprConseqElse &expr)
{}
{
stream << "if ";
expr.vis_if_condition (*this);
expr.vis_if_block (*this);
stream << indentation << "else ";
expr.vis_else_block (*this);
}
void
Dump::visit (IfExprConseqIf &expr)
{}
{
stream << "if ";
expr.vis_if_condition (*this);
expr.vis_if_block (*this);
stream << indentation << "else if ";
expr.vis_conseq_if_expr (*this);
}
void
Dump::visit (IfExprConseqIfLet &expr)