Awesome
monkey-rust
An interpreter for the Monkey programming language written in Rust
What’s Monkey?
Monkey has a C-like syntax, supports variable bindings, prefix and infix operators, has first-class and higher-order functions, can handle closures with ease and has integers, booleans, arrays and hashes built-in.
Official site is: https://monkeylang.org/. It's has various implementation languages :).
There is a book about learning how to make an interpreter: Writing An Interpreter In Go. This is where the Monkey programming language come from.
Features
- Split packages to make everything minimum
- REPL: A Read-Eval-Print-Loop (REPL) for Monkey tokenizer, parser, evaluator, compiler
- location info for ast
- test for every module
- Wasm: A WebAssembly target, thus run monkey on browser is directly supported.
- bytecode viewer from source
AST Online playground
Compiler playground
https://gengjiawen.github.io/monkey-rust/
Instruction
Build and test
$ cargo build
$ cargo test