A Monkey implementation in Rust for learning purpose.
This impelmentation includes both an interpreter and a virtual machine.
To run the Virtual Machine, use the following command:
cargo run
This will start a REPL where you can enter Monkey code.
Example:
>> let a = 5;
null
>> let b = 10;
null
>> let add = fn(x, y) { x + y };
null
>> add(a, b);
15
You can also run a Monkey file with this command:
cargo run -- sample.mk
To run the interpreter, use the following command:
cargo run --engine=eval