-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
Hi,
I've played around with the tinyexpr included in fish. I rewrote it here using more of c++ (than the very c-like code), and added variadic function support.
Changes:
- direct evaluation since fish didn't use any features (e.g. variables) that required separate parse or optimise steps
- support for variadic functions (and example functions
minimumandmaximum) - functions are stored in a
std::unordered_map, so that alphabetical order is no longer required and the lookup is simpler
Would this be of interest to you? If you'd like, I could open a pull request.
The current implementation of variadic functions doesn't support reporting errors from the functions, which might be good to have at some point. Also a question: Should some existing functions be made variadic, or should some variadic functions be added?
Reactions are currently unavailable