A Monkey Programming Language Interpreter written in Rust
Note: This is still in development!
I've been following the Writing an Interpreter in Go book and
this is my attempt to write the Monkey interpreter in Rust.
Please note that this is a personal project, done for fun, and may contain bugs.
At the time of this commit, the interpreter is fairly basic, it is at the level at the end of the
third chapter of the book.
- let statements:
let x = 32;
- if statements:
if (!!true) { 2 + 3 };
- functions:
fn (x) { 2 * x }(10);
- return statements:
return 3;
- Prefix operators:
-3; !false;
- Inflix operators:
+
,-
,*
,/
,>
,>=
,<
,<=
,==
,!=
To run the REPL:
cargo run --release --bin repl
cargo run --release --bin monkey <path-to-file>