public IEnumerator Execute(StormExecutor executor, Variable variable) { switch (type) { case LoopType.Finite: if (!variable.TryGetValue(out int count)) { count = 0; } if (count < loopCount) { variable.SetValue(count + 1); executor.Next(); } else { variable.Reset(); executor.JumpTo(outScopeIndex); } break; case LoopType.Conditional: // TODO: Condition expression break; default: throw new ArgumentOutOfRangeException(); } yield break; }
public IEnumerator Execute(StormExecutor executor, Variable variable) { executor.JumpTo(beginLoopIndex); yield break; }