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

Exception when custom function name contains "let" #31

Open
BrianMacIntosh opened this issue Oct 8, 2020 · 0 comments · May be fixed by #32
Open

Exception when custom function name contains "let" #31

BrianMacIntosh opened this issue Oct 8, 2020 · 0 comments · May be fixed by #32

Comments

@BrianMacIntosh
Copy link

This exception is thrown when parsing an expression containing a custom function that contains the substring 'let'.

Call stack:
` mscorlib.dll!string.Substring(int startIndex, int length) Unknown

MathParser.dll!Mathos.Parser.MathParser.ProgrammaticallyParse(string mathExpression, bool correctExpression, bool identifyComments) Line 319 C#
MathParserTest.exe!Mathos.Parser.Test.Program.Main(string[] args) Line 16 C#
`

Test code:
MathParser parser = new MathParser(); parser.LocalFunctions.Add("notlet", (inputs) => inputs[0]); Console.WriteLine(parser.ProgrammaticallyParse("1 + notlet(2)"));

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

Successfully merging a pull request may close this issue.

1 participant