Language Expansion
Purpose
- move from expression parser to statement language
- add bindings, flow, and callable units
Truth model
- falsey:
false,nil - truthy: everything else
Variables and assignment
- declarations: let / var / const
- assignment vs declaration distinction
- block scope in syntax (name resolution in later passes)
Statements added
- variable declaration
- assignment and expression statements
- if/else
- while
- return
- block
Functions in this stage
- top-level
fn name(params) { ... } - body is a statement block
- enables call semantics in later phases
Practice focus
- top-level function vs nested statement parsing
- falsey checks
- control-flow parse shape
- statement classification by token lookahead
1 / 1