3 ms·
That's a nice set of readable code. I made a minor change just to add in floats instead of ints, which wasn't too hard to accomplish thanks to your structure.
by stevekemp 10y ago
That's a nice set of readable code. I made a minor change just to add in floats instead of ints, which wasn't too hard to accomplish thanks to your structure.
(Though my changes are ugly).
If/When you get to implementing functions things will get really useful :)
- jhedwards 10y agoI 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 :)