chrisosaurus / dodo

scriptable in place file editor
MIT License
4 stars 1 forks source link

Implement a repl, fix misc memory leaks #15

Closed phillid closed 9 years ago

phillid commented 9 years ago

Does what it says on the tin.

The repl I have implemented cannot be quit out of using the quit commend. It is impossible to tell if a quit command was implicit or explicit, so it will only exit the loop on EOF. In short, the repl reads a line, parses it, and executes it. In order to maintain program state, it keeps the same struct Program lying around between iterations and simply re-reads a line of code in to the source field, parses it, and executes it.

Also fixes some memory leaks I encountered while developing the repl and having parse failures.

chrisosaurus commented 9 years ago

@phillid awesome! thanks for this, I will try find time to go over this with a fine tooth comb over the next few nights :D

chrisosaurus commented 9 years ago

@phillid looks really good, thanks once again for the amazing work.