Skip to content

Commit

Permalink
RakuAST: fix issue with deparsing elsif|orwith / else
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 4, 2023
1 parent c814416 commit 7088588
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core.c/RakuAST/Deparse.rakumod
Expand Up @@ -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));
Expand Down

0 comments on commit 7088588

Please sign in to comment.