LiveData.Tracked.FlatAst.Pass.Normalize (live_data v0.1.0-alpha0)
Normalizes the AST, making things easier for later passes.
- Flatten nested blocks into a single linear block.
- Normalize nested expressions into a sequence of assignments. The value portion of an assignment is only ever one expression deep.
Before the normalization pass is run, the AST will contain Expr.Block
nodes.
After normalization, all Expr.Block
s will be rewritten into Expr.Scope
s.
Link to this section Summary
Link to this section Functions
Link to this function
flatten_block(expr_id, ast)
Link to this function
flatten_block_rec(expr_id, ast)
Link to this function
flatten_block_rec_inner(expr, expr_id, ast)
Link to this function