visitRepeatUntilLoopStmt method
Implementation
@override
Object? visitRepeatUntilLoopStmt(RepeatUntilLoopStmt repeatUntilLoopStmt) {
final prevScope = scope;
pushScope();
while (true) {
try {
for (Stmt stmt in repeatUntilLoopStmt.body) {
try {
stmt.accept(this);
} on LuaBreakStmtException {
rethrow;
} catch (e) {
addError(e.toString());
}
}
final cond = repeatUntilLoopStmt.untilExpr.accept(this);
if (cond?.isTruthy ?? false) {
break;
}
} on LuaBreakStmtException {
break;
} catch (e) {
addError(e.toString());
break;
}
}
restoreScope(prevScope);
return null;
}