Internals
These pages follow the reference interpreter from a source file to a running program. Each page explains one piece: what it is responsible for, and why the implementation keeps it separate. The language rules live in Usage and the Reference .
The pipeline is fixed. Source text is loaded, split into tokens, parsed into a tree, and then walked. Nothing in that pipeline passes Lupe source to Python's
eval
or
exec
.
Sections
- Lexer turns characters into tokens and drops comments.
- Parser turns tokens into a syntax tree.
- Interpreter walks that tree, stores values, and prints.
- Control Flow runs conditions and loops.
- Functions and Scope gives each call its own locals.
- Collections stores lists and dictionaries by reference.
- Built-in Functions supplies the fixed function set.
- Modules and the REPL loads other files and keeps a session.
lupe tokens
and
lupe ast
show the first two stages without running the script.
lupe check
stops after the parser.