This commit is contained in:
Greg 2025-02-03 16:03:42 +02:00
parent 4ea80598b3
commit 894ef20cf5

View file

@ -1,3 +1,44 @@
# GLOX # GLOX
Lox interpreter written i Go. 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"](https://www.craftinginterpreters.com/).
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