Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 1.75 KB

README.md

File metadata and controls

58 lines (37 loc) · 1.75 KB

monkey-rs Build Status

A compiler for the Monkey programming language written in Rust

The Monkey Programming Language

The official Monkey logo

What's Monkey?

Monkey is a programming language designed for learning about interpreter implementation, used in a book, Writing An Interpreter In Go.

Again, why?

Some people may already know that I've written a Monkey interpreter in Haskell. Why do I rewrite a similar thing in another language? Does it really mean anything?

Well, I've recently started learning Rust, and thought rewriting what I've already made would be a nice start to learn a new language. Also, the transition may not be so difficult as Rust adopted many language concepts from Haskell, such as pattern match, error handling, and trait (known as type class in Haskell).

Let me see if I can do it well ✌️

Screenshot

Compiler error messages

REPL

Instruction

Build, test and install:

cargo build --all
cargo test --all
cargo install

Run REPL and scripts:

monkey repl
monkey run examples/map-reduce.mk

License

MIT