public object Visit(Do stmt) { do { Token signal = (Token)Execute(stmt.body); if (signal != null && signal.type == BREAK) { break; } } while (CheckIsTruthy(Evaluate(stmt.cond))); return(null); }
public object Visit(Do stmt) { LoopType enclosingLoopType = currentLoopType; currentLoopType = LoopType.DO; BeginScope(); Resolve(stmt.body); Resolve(stmt.cond); EndScope(); currentLoopType = enclosingLoopType; return(null); }