Skip to main content

Crate lux

Crate lux 

Source
Expand description

lux — a small teaching language.

The pipeline is the classic three stages: lexer turns source text into tokens, parser turns tokens into an ast, and interpreter walks the ast and runs it. diagnostic carries source positions so an error can point at the exact place it went wrong.

Modules§

ast
The abstract syntax tree: the shape of a parsed lux program.
convert
Translate a parsed lux program into a target language’s source.
diagnostic
Source positions and error reporting.
interpreter
The interpreter: walk the ast and run it.
learn
lux learn — the language’s own teaching material, built into the binary.
lexer
The lexer: source text in, a flat list of tokens out.
magic
lux magic — spells for things you want to do now.
parser
The parser: tokens in, an ast out.