Calling method on integer literals (like: `5.ToString()` )
nborelli opened this issue · comments
Hi Davide,
It is not much of an issue at all, but I found a minor defect in number parsing. It seems that number parsing is a little too eager.
This will not work:
5.ToString()
But 5 .ToString() or (5).ToString() or 5.0.ToString() will.
As I said earlier, a very minor problem and easy to work around. Would also probably not be encountered very often.
DynamicExpresso.ParseException: Digit expected (at index 2).
at DynamicExpresso.ExpressionParser.ValidateDigit()
at DynamicExpresso.ExpressionParser.NextToken()
at DynamicExpresso.ExpressionParser..ctor(String expression, Type expressionType, ParameterExpression[] parameters, ParserSettings settings)
at DynamicExpresso.Interpreter.ParseExpression(String expressionText, Type expressionType, ParameterExpression[] parameters)
at DynamicExpresso.Interpreter.Parse(String expressionText, Type expressionType, Parameter[] parameters)
at DynamicExpresso.Interpreter.Parse(String expressionText, Parameter[] parameters)
at DynamicExpressoDemo.MainViewModel.Evaluate() in c:\Users\neal.borelli\Documents\Visual Studio 2013\Projects\DynamicExpressoDemo\DynamicExpressoDemo\MainViewModel.cs:line 128
Just fixed in version 0.11.2.0. Thank you for bug report!