public ExpressionParser( string expression, IIdentifierResolver resolver, Type iteratorType )
        {
            if ( expression == null ) throw new ArgumentNullException( "expression" );

            identifierResolver = resolver;

            if ( iteratorType != null )
            {
                IteratorParameter = Expression.Parameter( iteratorType, "" );
            }

            literals = new Dictionary<Expression, string>();
            text = expression;
            textLen = text.Length;

            SetTextPos( 0 );
            NextToken();
        }
 public ExpressionParser( string expression, IIdentifierResolver resolver )
     : this( expression, resolver, null )
 {
 }
 public SourceReferenceSerializer(IIdentifierResolver identifierResolver)
 {
     _identifierResolver = identifierResolver;
 }
        public static LambdaExpression ParseLambda(Type itType, Type resultType, string expression, IIdentifierResolver resolver)
        {
            var parser = new ExpressionParser(expression, resolver, itType);

            return(Expression.Lambda(parser.Parse(resultType), parser.IteratorParameter));
        }
 public static Expression <Func <TIterator, TResult> > ParseLambda <TIterator, TResult>(string expression, IIdentifierResolver resolver)
 {
     return((Expression <Func <TIterator, TResult> >)ParseLambda(typeof(TIterator), typeof(TResult), expression, resolver));
 }
        public static LambdaExpression ParseLambda(Type resultType, string expression, IIdentifierResolver resolver)
        {
            var parser = new ExpressionParser(expression, resolver);

            return(Expression.Lambda(parser.Parse(resultType)));
        }