diff options
author | David Faust <david.faust@oracle.com> | 2022-10-13 09:27:35 -0700 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:33 +0100 |
commit | 0a9114c151b8a80e4c7e5e1e4823805436870cd7 (patch) | |
tree | a8b19cabd82e6a75c9920f8142e11c2869b6a87f /gcc/rust | |
parent | b1510ce0fc77d061235e30fed44e93c88c559a38 (diff) | |
download | gcc-0a9114c151b8a80e4c7e5e1e4823805436870cd7.zip gcc-0a9114c151b8a80e4c7e5e1e4823805436870cd7.tar.gz gcc-0a9114c151b8a80e4c7e5e1e4823805436870cd7.tar.bz2 |
gccrs: ast: dump: minor fixups to IfExpr formatting
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): Fix IfExpr formatting.
Diffstat (limited to 'gcc/rust')
-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); } |