mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 20:01:22 -05:00
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:
committed by
Arthur Cohen
parent
980bd25e25
commit
aeed747093
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user