From 708858838c30080d8dea419a548984fa21fecf8e Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Wed, 4 Oct 2023 10:10:53 +0200 Subject: [PATCH] RakuAST: fix issue with deparsing elsif|orwith / else --- src/core.c/RakuAST/Deparse.rakumod | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core.c/RakuAST/Deparse.rakumod b/src/core.c/RakuAST/Deparse.rakumod index f672c5808e3..8e69f16790e 100644 --- a/src/core.c/RakuAST/Deparse.rakumod +++ b/src/core.c/RakuAST/Deparse.rakumod @@ -1910,11 +1910,16 @@ class RakuAST::Deparse { multi method deparse(RakuAST::Statement::IfWith:D $ast --> Str:D) { my str @parts = self.conditional($ast, $ast.IMPL-QAST-TYPE); + my $INDENT := $*INDENT; if $ast.elsifs -> @elsifs { - @parts.push(self.deparse($_)) for @elsifs; + for @elsifs { + @parts.push($INDENT); + @parts.push(self.deparse($_)); + } } if $ast.else -> $else { + @parts.push($INDENT); @parts.push(self.syn-block('else')); @parts.push(' '); @parts.push(self.deparse($else));