From 6e2fd41a8b1d0f53b803266019bb055f6d735d69 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Tue, 22 Oct 2024 21:14:26 +0200 Subject: [PATCH] ast printer correctly prints unroll and continue --- compilerAst/src/prog8/ast/AstToSourceTextConverter.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/compilerAst/src/prog8/ast/AstToSourceTextConverter.kt b/compilerAst/src/prog8/ast/AstToSourceTextConverter.kt index a42f71a02..604e49343 100644 --- a/compilerAst/src/prog8/ast/AstToSourceTextConverter.kt +++ b/compilerAst/src/prog8/ast/AstToSourceTextConverter.kt @@ -53,6 +53,17 @@ class AstToSourceTextConverter(val output: (text: String) -> Unit, val program: outputln("}\n") } + override fun visit(continueStmt: Continue) { + output("continue") + } + + override fun visit(unrollLoop: UnrollLoop) { + output("unroll ") + unrollLoop.iterations.accept(this) + output(" ") + unrollLoop.body.accept(this) + } + override fun visit(containment: ContainmentCheck) { containment.element.accept(this) output(" in ")