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

Function.checkSyntax() always returns true #111

Closed
andytwidle opened this issue Nov 21, 2017 · 4 comments
Closed

Function.checkSyntax() always returns true #111

andytwidle opened this issue Nov 21, 2017 · 4 comments
Labels
Milestone

Comments

@andytwidle
Copy link

The following code snippet:

var f = new Function("f(x) = (3 + 5*x");
Console.WriteLine($"checkSyntax: {f.checkSyntax()}");
Console.WriteLine($"getErrorMessage: {f.getErrorMessage()}");

yields the output

checkSyntax: True
getErrorMessage: [ (3 + 5*x] checking ...
[ (3 + 5*x] lexical error

Encountered "<EOF>" at line 1, column 9.
Was expecting one of:
    "(" ...

It doesn't seem to matter what the function is, checkSyntax now always returns true.
Function.getErrorMessage() behaves as expected.
Expression.checkSyntax() also behaves as expected.

Issue discovered in 4.1.1 (build from nuget.org)
TargetFramework=net461

In 3.0.0 Function.checkSyntax() worked as expected

Absolutely brilliant library, very much appreciate your hard work!

@mariuszgromada mariuszgromada added this to the v.4.2 Aquaria milestone Nov 21, 2017
@mariuszgromada
Copy link
Owner

This is interesting, for sure a silly bug :-) Thanks!

Thank you for your feedback!

@mariuszgromada
Copy link
Owner

If you like the library - please give a star to the repository :-)

@mariuszgromada
Copy link
Owner

As I expected, silly bug introduced with new functionality providing user function based on body implemented in C# / JAVA. Fixed.

@mariuszgromada
Copy link
Owner

Released - check nuget or maven :-)

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

No branches or pull requests

2 participants