A Rust implementation of the Monkey language's interpreter and compiler.
Added features:
- Comments
// This is a comment - Logical operators,
&&and|| - Loops,
loopandbreak - Mutate variables:
let foo = 1;
foo = foo + 1;
foo; //2
- Postfix operators on variables,
foo++;andbar--;
Build the app:
cargo build --release
To start the repl using the compiler/vm:
./target/release/repl
To start the repl using the interpreter:
./target/release/repl --mode eval
To execute a .monkey file with the compiler/vm:
./target/release/repl monkey_examples/fibonacci.monkey
To execute a .monkey file with the interpreter:
./target/release/repl monkey_examples/fibonacci.monkey --mode eval
