Skip to content

Exception when custom function name contains "let" #31

@BrianMacIntosh

Description

@BrianMacIntosh

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)"));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions