NewLineCount() public static méthode

public static NewLineCount ( String input ) : int
input String
Résultat int
Exemple #1
0
        public override void Evaluate()
        {
            waitExpression = new Expression(RegexMatch.Groups[1].Value, ParentContext);

            int numLinesChild = Utils.NewLineCount(Input.Substring(0, RegexMatch.Groups[2].Index));

            targetCommand = Command.Get(RegexMatch.Groups[2].Value, this, Line + numLinesChild);

            //commandString = RegexMatch.Groups[2].Value;

            State = ExecutionState.WAIT;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
        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;
            }
        }
Exemple #4
0
        public override void Evaluate()
        {
            UnityEngine.Debug.Log("For UNTIL: " + RegexMatch);

            for (var i = 0; i < RegexMatch.Groups.Count; i++)
            {
                var group = RegexMatch.Groups[1];
                UnityEngine.Debug.Log("Until Match Group V: " + group.Value + " I: " + group.Index + "-" + i);
            }
            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;
        }