public override void Evaluate() { targetVariable = ParentContext.FindOrCreateVariable(RegexMatch.Groups[1].Value); targetCommand = Command.Get(RegexMatch.Groups[2].Value, ParentContext); if (!objToBool(targetVariable.Value, out originalValue)) { throw new Exception("Value type error"); } ParentContext.Lock(this); State = ExecutionState.DONE; }
public override void Evaluate() { targetExpression = new Expression(RegexMatch.Groups[1].Value, ParentContext); targetCommand = Command.Get(RegexMatch.Groups[2].Value, ParentContext); if (!objToBool(targetExpression.GetValue(), out originalValue)) { throw new kOSException("Value type error"); } ParentContext.Lock(this); State = ExecutionState.DONE; }
public virtual void Unlock(Command command) { CommandLocks.Remove(command); if (ParentContext != null) ParentContext.Unlock(command); }
public virtual void Lock(Command command) { CommandLocks.Add(command); }
public override void Evaluate() { waitExpression = new Expression(RegexMatch.Groups[1].Value, ParentContext); var numLinesChild = Utils.NewLineCount(Input.Substring(0, RegexMatch.Groups[2].Index)); targetCommand = Get(RegexMatch.Groups[2].Value, this, Line + numLinesChild); //commandString = RegexMatch.Groups[2].Value; State = ExecutionState.WAIT; }
public override void Evaluate() { expression = new Expression(RegexMatch.Groups[1].Value, ParentContext); int numLinesChild = Utils.NewLineCount(Input.Substring(0, RegexMatch.Groups[2].Index)); targetCommand = Get(RegexMatch.Groups[2].Value, this, Line + numLinesChild); if (expression.IsTrue()) { targetCommand.Evaluate(); Push(targetCommand); State = ExecutionState.WAIT; } else { State = ExecutionState.DONE; } }
public override void Evaluate() { var listName = RegexMatch.Groups[2].Value; iteratorString = RegexMatch.Groups[1].Value; var expression = new Expression(listName, ParentContext).GetValue(); var list = expression as ListValue; iterator = list.GetSuffix("ITERATOR") as Enumerator; int numLinesChild = Utils.NewLineCount(Input.Substring(0, RegexMatch.Groups[2].Index)); targetCommand = Get(RegexMatch.Groups[3].Value, this, Line + numLinesChild); State = ExecutionState.WAIT; }
public override void Evaluate() { expression = new Expression(RegexMatch.Groups[1].Value, ParentContext); targetCommand = Command.Get(RegexMatch.Groups[2].Value, ParentContext); ParentContext.Lock(this); State = ExecutionState.DONE; }
public override void Unlock(Command command) { if (ParentContext != null) ParentContext.Unlock(command); }
public override void Evaluate() { expression = new Expression(RegexMatch.Groups[1].Value, ParentContext); targetCommand = Command.Get(RegexMatch.Groups[2].Value, this); if (expression.IsTrue()) { targetCommand.Evaluate(); Push(targetCommand); State = ExecutionState.WAIT; } else { State = ExecutionState.DONE; } }