Lox implementations from Crafting Interpreters in Go.
go test -v ./tests
Target a specific suite
go test ./tests -run "TestLoxSuite/tw/assignment"
Or file
go test ./tests -run "TestLoxSuite/tw/assignment/associativty.lox"
- Move errors to seperate package
- C-style block comments
/* ... */ - Ternary operator
cond ? a : b - Shorthand
++---=+= -
breakandcontinue - Arrays (indexing, length query, iteration)
[]using Object -
switchstatements - String interpolation:
"{}" - Anonymous functions:
(params) => expr(params) => { stmt }
- Compile-time constant folding (
1 + 2becomes3) - Dead code elimination