Beispiel #1
0
        internal IExpression Parse(JToken token, int index, Type expected, Dictionary <string, IExpression> bindings)
        {
            var parser = new ExpressionParser(Key + "[" + index.ToString() + "]", Errors, expected, new Scope(bindings, Scope));

            return(parser.Parse(token, expected));
        }
Beispiel #2
0
        //internal IExpression ParseExpression(JToken token, TypeAnnotationOption typeAnnotationOption = TypeAnnotationOption.None)
        //{
        //    return Parse(token, typeAnnotationOption);
        //}

        /// <summary>
        /// Parse a child expression. For use by individual Expression.Parse() methods.
        /// </summary>
        /// <param name="array">Array containing the child</param>
        /// <param name="index">Index of child in array</param>
        /// <param name="expected">Expected type for this child</param>
        /// <param name="typeAnnotationOption">Type annotations</param>
        /// <returns>Expression for this child</returns>
        internal IExpression Parse(JToken token, int index, Type expected = null, TypeAnnotationOption typeAnnotationOption = TypeAnnotationOption.None)
        {
            var parser = new ExpressionParser(Key + "[" + index.ToString() + "]", Errors, expected, Scope);

            return(parser.Parse(token, expected));
        }