public Push ( System.Numerics.BigInteger value ) : void | ||
value | System.Numerics.BigInteger | |
return | void |
public override IEnumerable <Position> Execute(UnreadableEnv env) { env.Push(null); again: // Evaluate the condition foreach (var pos in _argCond.Execute(env)) { yield return(pos); } yield return(Position); var value = env.Pop(); if (value == null) { throw new Exception("While condition cannot be void."); } if (!value.Value.IsZero) { // Discard result from previous iteration env.Pop(); // Execute the code foreach (var pos in _argCode.Execute(env)) { yield return(pos); } yield return(Position); goto again; } // Last result is now on the stack yield return(Position); }
public override IEnumerable<Position> Execute(UnreadableEnv env) { env.Push(null); again: // Evaluate the condition foreach (var pos in _argCond.Execute(env)) yield return pos; yield return Position; var value = env.Pop(); if (value == null) throw new Exception("While condition cannot be void."); if (!value.Value.IsZero) { // Discard result from previous iteration env.Pop(); // Execute the code foreach (var pos in _argCode.Execute(env)) yield return pos; yield return Position; goto again; } // Last result is now on the stack yield return Position; }