Matthew Crumley
Matthew Crumley
Thanks for finding and fixing this! I had it create a pull request (#252) and I'll make sure it gets merged and released soon.
I'm not sure this would be possible without duplicating essentially the whole evaluator. I agree it would be useful though, so I'll give it some thought.
Unfortunately, the binaryOps object can't be used to add new operators, only change the implementation of existing ones. It's kind of confusing because you can add to unaryOps (with the...
I'm not sure I understand the context for this. Can you add an example of how it would work with an expression?
Thanks, I see what you mean now. Support for objects right now is pretty limited, so I don't see a way to do that. It is possible with a JavaScript...
That's an interesting problem. Your variable solution is a good workaround, and while it's using it in a slightly different way than how it's intended, it's fully supported and shouldn't...
Certain types of syntax errors include the character position in the error message, but it's not consistent. That could definitely use some work, maybe including using a custom Error sub-class...
The `substitute` function doesn't support that, but you could use `simplify`, which will evaluate what it can, and leave the rest of the expression alone. const exp = parser.parse('variable1 +...
The original reason for writing the expression parser/evaluator was for generating function graphs, so that wasn't an issue. That is a good idea though, and shouldn't be too hard. I'm...
The other parser is part of a larger project, and at least as it exists now, can't be separated into it's own library. It's also still using IEEE 754 floats,...