News for hackers. Stuff that matters.
Re:Show HN: Writing my first interpreter in C for fun by jhedwards on Wednesday June 22, 2016 @11:28AM (#11954671)
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.

Re:Show HN: Writing my first interpreter in C for fun by stevekemp on Wednesday June 22, 2016 @11:56AM (#11954865)
Wonderful news. I managed to gloss over that :)