Catrobat.IDE.Core.Formulas.FormulaInterpreter.Complete C# (CSharp) Method

Complete() public static method

public static Complete ( IList tokens, int index ) : Range
tokens IList
index int
return Catrobat.IDE.Core.CatrobatObjects.Range
        public static Range Complete(IList<IFormulaToken> tokens, int index)
        {
            //var sw = new Stopwatch();
            //sw.Start();

            // validate input
            if (tokens == null || !(0 <= index && index < tokens.Count)) return Range.Empty(0);

            // complete token
            var instance = new FormulaInterpreter();
            var result = instance.Complete2(tokens, index);

            //sw.Stop();
            // Debug.WriteLine("Interpreter.CompleteToken needed " + sw.ElapsedMilliseconds + "ms");

            return result;
        }