rust-yard icon indicating copy to clipboard operation
rust-yard copied to clipboard

Custom functions and variables

Open TheNeikos opened this issue 8 years ago • 7 comments

Heya! Just stumbled upon your library and first I wanted to say nice job :+1: Looking good.

I have a project I would like to implement this in, however I would need two more features that would make it more usable for me:

  • Custom functions
    • This could be implemented with a HashMap<&'static str, fn(&stack) -> f64>
  • Variables
    • In my application the user will input a calculation and this will have to be evaluated with the values put in correctly. This could also be implemented with a HashMap, akin to 'if it has no parantheses it's a variables' and on resolution you replace the value using the user supplied HashMap.

Is this something you would like to see in your project as well? If yes, I wouldn't mind sending in some PR's in the near future.

TheNeikos avatar Mar 28 '16 14:03 TheNeikos