1 module orelang.operator.UntilOperator; 2 import orelang.operator.IOperator, 3 orelang.Engine, 4 orelang.Value; 5 6 class UntilOperator : IOperator { 7 /** 8 * Loop while the condition is false 9 */ 10 public Value call(Engine engine, Value[] args) { 11 Value ret = null; 12 13 while (!engine.eval(args[0]).getBool) { 14 ret = engine.eval(args[1]); 15 } 16 17 return ret; 18 } 19 }