mirror of
https://github.com/irmen/prog8.git
synced 2024-12-22 18:30:01 +00:00
ast printer correctly prints ifexpression
This commit is contained in:
parent
6e2fd41a8b
commit
1e82483152
@ -53,6 +53,15 @@ class AstToSourceTextConverter(val output: (text: String) -> Unit, val program:
|
||||
outputln("}\n")
|
||||
}
|
||||
|
||||
override fun visit(ifExpr: IfExpression) {
|
||||
output("if ")
|
||||
ifExpr.condition.accept(this)
|
||||
output(" ")
|
||||
ifExpr.truevalue.accept(this)
|
||||
output(" else ")
|
||||
ifExpr.falsevalue.accept(this)
|
||||
}
|
||||
|
||||
override fun visit(continueStmt: Continue) {
|
||||
output("continue")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user