diff options
author | David Faust <david.faust@oracle.com> | 2022-10-05 10:11:38 -0700 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2022-10-05 10:11:38 -0700 |
commit | e9e5288a303df10829d1f34e3d2ebff793a74ea0 (patch) | |
tree | 12a1ae474caaefc7df006e253ee62a46fa8743db | |
parent | d55f22d046f5b54ec6d77af040aa1805e12ea9d1 (diff) | |
download | gcc-e9e5288a303df10829d1f34e3d2ebff793a74ea0.zip gcc-e9e5288a303df10829d1f34e3d2ebff793a74ea0.tar.gz gcc-e9e5288a303df10829d1f34e3d2ebff793a74ea0.tar.bz2 |
ast: dump If expressions
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index f137f4e..48497b7 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -509,15 +509,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) |