math-expressions icon indicating copy to clipboard operation
math-expressions copied to clipboard

Expand on custom functions

Open FEDE0D opened this issue 4 years ago • 4 comments

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.

FEDE0D avatar May 18 '20 00:05 FEDE0D

+1 on this! :)

I need several custom functions within the parser, too.

S-Man42 avatar Jun 12 '20 08:06 S-Man42

Any news on that? I'd really appreciate that.

S-Man42 avatar Jul 27 '21 11:07 S-Man42

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?

fkleon avatar Jul 31 '21 11:07 fkleon

Well, sounds interesting. Will play around with it once it is merged and released... Maybe that might help me.

S-Man42 avatar Jul 31 '21 17:07 S-Man42