3 ms·
I did the same thing recently, extending the "monkey" language which is introduced in "Writing An Interpreter In Go". Now it supports comments, file I/O, strin
by stevekemp 8y ago
I did the same thing recently, extending the "monkey" language which is introduced in "Writing An Interpreter In Go".
Now it supports comments, file I/O, string-primitives, regular expression support and similar things:
https://github.com/skx/monkey/ https://github.com/skx/monkey/
Updating the lexer/parser/evaluator was nice and simple once you understand how the various parts hook together. The downside is that if you want to create a standard-library for your language you need to spend a lot of time on it.