A complete interpreter and compiler for a language based on Thorsten Ball's "Writing an Interpreter in Go" using only the standard library. The current implemented features are:
- Tokeniser (AST)
- Lexer
- Parser
- Evaluator
- REPL
- Files
- Int
- String
- Bool
- Variable binding
- Functions
- Closures
- Arrays
- Builtins (len, first, last, tail, puts)
- Compiler
- Virtual Machine
The parser is using Pratt's algorithm, which is modular and easily extensible. The evaluator is an implementation of a tree-walking interpreter and no byte-code is generated. There are no primitive types - everything is an object a la Ruby.
The compiler is less complete than the interpreter - it doesn't fully support fns.