From f6002438d55d1f988defe2c7c956bc1fc1090f39 Mon Sep 17 00:00:00 2001 From: Timm Friebe Date: Sun, 1 Oct 2023 19:13:05 +0200 Subject: [PATCH] Transform multiple nodes without creating statements --- src/main/php/lang/ast/Emitter.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/php/lang/ast/Emitter.class.php b/src/main/php/lang/ast/Emitter.class.php index 78cb79d5..987a532f 100755 --- a/src/main/php/lang/ast/Emitter.class.php +++ b/src/main/php/lang/ast/Emitter.class.php @@ -148,9 +148,9 @@ public function emitOne($result, $node) { $this->{'emit'.$r->kind}($result, $r); return; } else if ($r) { - foreach ($r as $n) { + foreach ($r as $s => $n) { $this->{'emit'.$n->kind}($result, $n); - $result->out->write(';'); + null === $s || $result->out->write(';'); } return; }