Python version of the Monkey programming language:
NOTE: This is a personal project created for the sole purpose of learning how to build interpreters / compilers and honing my Python skills. You may borrow code under the licence.
- Python 3.6+
Inside the src/monkey:
The Monkey interpreter plus macros can be run with:
python main.py
The compiler isn't complete yet but can be run with a flag --c
:
python main.py --c
Ultimately, to compile a Monkey file, this command will be used instead:
python main.py [Program.mnk] [args]
Inside the test:
python [test_file].py
- Interpreter
- Built-in types and functions
- Macros
- Compile expressions
- Conditionals
- Data structures
- Functions
- Closures
- Better error handling (stack trace)
- More operators like postfix (e.g. ++, --) or ternary
- Default arguments to functions
- Macros hygiene
- Debugging Macros
- Continuations
- Time travel debugging