751 B
751 B
GLOX
Lox interpreter written i Go.
This is ongoing project where I try to recreate "JLOX" language in Go instead of Java. It completly based on instructions from Bob Nystrom's book "Crafting interpretters".
Currently supported:
- REPL
- variables
- functions
- functions as values
- closures
- exceptions
- classes
- scoped blocks
- conditions
- loops
- basic arithmetic
- AST printing
- error recovery
TODO:
- Virtual Machine
- Intermediate representaion
Run
Simply compile and run binary. By default you will get REPL session.
go build
./glox
> print 1 + 1;
If you want to run script - just pass script path as an argument:
go build
./glox ./tests/functions.lox
Testing
TODO