4 ms·
I just realized reading your comment that I did implement functions but I forgot to document them! I will update the readme immediately. If you look in the mai
by jhedwards 10y ago
I just realized reading your comment that I did implement functions but I forgot to document them! I will update the readme immediately.
If you look in the main file, huo.c, you will see something called store_defs. That function takes the ASTs of defined functions and stores them in a key-val type store. If someone invokes a user-defined function I just grab the AST, replace the variables with the values they passed in and execute it. That code is in process_defs and is invoked by execute.
- stevekemp 10y agoWonderful news. I managed to gloss over that :)