added Foreverloop statement to the ast simulator

This commit is contained in:
Irmen de Jong 2020-03-19 22:45:27 +01:00
parent 29ac160811
commit 82dce2dd53

View File

@ -543,6 +543,17 @@ class AstVm(val program: Program, compilationTarget: String) {
}
}
}
is ForeverLoop -> {
while(true) {
try {
executeAnonymousScope(stmt.body)
} catch (b: LoopControlBreak) {
break
} catch (c: LoopControlContinue) {
continue
}
}
}
else -> {
TODO("astvm implement statement $stmt")
}