Ejemplo n.º 1
0
        private ParseResult ParseInternal(string text, Type forcedOutputType, params Parameter[] parameters)
        {
            _parameters = parameters;
            var tokenizer = new Tokenizer();
            var nodes     = tokenizer.Tokenize(text);

            tokenizer.AggregateOperators(nodes);
            tokenizer.Categorize(nodes, _parameters);

            var expressionBuilder = new ExpressionBuilder(parameters, forcedOutputType);
            var expression        = expressionBuilder.BuildExpression(nodes);

            var lambda = Expression.Lambda(expression, expressionBuilder.Parameters);

            return(new ParseResult(lambda));
        }