Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore missing zero in numeric values #147

Open
ko-vasilev opened this issue Jul 7, 2022 · 0 comments
Open

Ignore missing zero in numeric values #147

ko-vasilev opened this issue Jul 7, 2022 · 0 comments

Comments

@ko-vasilev
Copy link

ko-vasilev commented Jul 7, 2022

Running the sample project mentioned in readme: https://dotnetfiddle.net/up4x3W
I'm changing expression value to string expression = "1+.5"; which should be identical to string expression = "1+0.5"; (it is a valid syntax in C#)

Right now it throws an exception:

Invalid character [46:.]

Stack Trace:

[CodingSeb.ExpressionEvaluator.ExpressionEvaluatorSyntaxErrorException: Invalid character [46:.]]
   at CodingSeb.ExpressionEvaluator.ExpressionEvaluator.Evaluate(String expression)
   at Program.Main() :line 20

I wasn't able to find an option that could enable this behavior. Does it mean I need to tweak the evaluator like mentioned on this page?
https://github.com/codingseb/ExpressionEvaluator/wiki/Advanced-Customization-and-Hacking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant