Skip to content

A Monkey implementation in Rust for learning purpose.

License

Notifications You must be signed in to change notification settings

yesmeck/monkey-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monkey

A Monkey implementation in Rust for learning purpose.

This impelmentation includes both an interpreter and a virtual machine.

Usage

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

Interpreter

To run the interpreter, use the following command:

cargo run --engine=eval

License

MIT

About

A Monkey implementation in Rust for learning purpose.

Resources

License

Stars

Watchers

Forks