Monkey language interpreter based on book "Writing an Interpreter in Go"
Supported features:
- Variables, variables reassignment
- Types: integers, booleans, strings, null
- Arithmetic operations and compound operators: +, -, *, /, +=, -=, *=, /=
- Comparison operations: ==, !=, <, <=, >, >=
- If statements
- C-like for loops (for (init; condition; post) { ... })
- Functions
- Closures
- Built-in functions
- Arrays
- Objects
To run REPL:
cargo run .
Example:
Welcome to Monkey programming language!
>> let addFunction = function(x, y) { return x + y; };
"null"
>> addFunction(6,2);
"8"