Closed TheLoneWolfling closed 8 years ago
My apologies for the lack of informative commit messages.
Cool, I am currently improving the execute function so that is has a map of local lets and a map of global lets. This simplifies function execution and is more performant (no more iterating down an AST to replace variable with values) and decouples let bindings inside functions from those in the global scope. I will finish that improvement before I merge this in because there may be some merge conflicts.
OK I merged this branch. This interpreter is a lot closer to being a stable program now! There was one part in your changes that caused some errors though: lines 54-57 in build_array.c. I commented them out for now but you might want to take another look at those lines.
I shall do so, thank you.
This adds a bunch of sanity checks to the parser. Still nowhere near robust, but it's (slowly) getting there. Next step: change arrays to dynamic allocation.