Skip to content

Ignore missing zero in numeric values #147

Description

@ko-vasilev

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions