"... light of my life."
The Lox Programming Language implemented in Rust.
Ported from the original Java-based jlox
tree-walking interpreter*, but with no visitor patterns, no null
values, no subclasses and implicit conversions, just pure enum
s.
Gc<T>
is a necessary evil...
* : For the bytecode VM interpreter, see rami3l/golox
.
- Lexer
- Parser
- Basic types
- Floating point arithmetic
- Logic expressions
- Control flow
- Jumps:
break
/continue
**- Semantic analysis: jumping out of loops
- Jumps:
- Functions
- Lambdas**
- Semantic analysis: returning out of functions
- Semantic analysis: static closure captures
- Classes
- Instances
- Instance methods
-
this
- Semantic analysis:
this
out of classes
- Semantic analysis:
- Initializers
- Semantic analysis:
return
ing values in initializers
- Semantic analysis:
-
- Inheritance
-
super
- Semantic analysis:
super
out of subclasses
- Semantic analysis:
-
** : Extension
With the latest Rust toolchain installed, just execute:
cargo run