diff options
author | David Faust <david.faust@oracle.com> | 2022-10-13 09:27:35 -0700 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2022-10-13 13:31:40 -0700 |
commit | 45326391da3e6800fa0a9e1f89420ac3a5ae340b (patch) | |
tree | a758fdb51ef06d6d9916fe4f20ca44a72ba110cc | |
parent | a5a86282306eea70b7c89bd221b8e8f1afa77a2e (diff) | |
download | gcc-45326391da3e6800fa0a9e1f89420ac3a5ae340b.zip gcc-45326391da3e6800fa0a9e1f89420ac3a5ae340b.tar.gz gcc-45326391da3e6800fa0a9e1f89420ac3a5ae340b.tar.bz2 |
ast: dump: minor fixups to IfExpr formatting
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc index 3b00c9f..1ba84b8 100644 --- a/gcc/rust/ast/rust-ast-dump.cc +++ b/gcc/rust/ast/rust-ast-dump.cc @@ -570,6 +570,7 @@ Dump::visit (IfExpr &expr) { stream << "if "; expr.vis_if_condition (*this); + stream << " "; expr.vis_if_block (*this); } @@ -578,6 +579,7 @@ Dump::visit (IfExprConseqElse &expr) { stream << "if "; expr.vis_if_condition (*this); + stream << " "; expr.vis_if_block (*this); stream << indentation << "else "; expr.vis_else_block (*this); @@ -588,8 +590,10 @@ Dump::visit (IfExprConseqIf &expr) { stream << "if "; expr.vis_if_condition (*this); + stream << " "; expr.vis_if_block (*this); - stream << indentation << "else if "; + stream << indentation << "else "; + // The "if" part of the "else if" is printed by the next visitor expr.vis_conseq_if_expr (*this); } |