math-expressions
math-expressions copied to clipboard
Expand on custom functions
Currently we have only the option to create custom functions and use them on manually created expressions. If we want to use them on a parse expression, it is currently not supported. For example, I need to add a min & max operations (IDK why they are not included by default) and I cannot use them on parsed expressions. It would be useful if we could add custom Tokens into the lexer.
+1 on this! :)
I need several custom functions within the parser, too.
Any news on that? I'd really appreciate that.
The existing CustomFunction
class isn't super useful right now for the use case you're after.
Have a look at #54 which introduces a facility to specify your own Dart handler code for functions, and also adds parser support. Would that solve your issue?
Well, sounds interesting. Will play around with it once it is merged and released... Maybe that might help me.