class Savi::Compiler::Sugar
- Savi::Compiler::Sugar
- Savi::AST::CopyOnMutateVisitor
- Reference
- Object
Overview
The purpose of the Sugar pass is to expand universal shorthand forms, by filling in default ASTs where they are omitted, or transforming syntax sugar forms into their corresponding standard/canonical form, so that later passes can deal in less diverse, more predictable forms.
This pass uses copy-on-mutate patterns to "mutate" the Program topology. This pass uses copy-on-mutate patterns to "mutate" the AST. This pass does not raise any compilation errors. This pass keeps temporary state at the per-function level. This pass produces no output state.
Defined in:
savi/compiler/sugar.crConstructors
Class Method Summary
Instance Method Summary
- #next_local_name
- #run(ctx, f)
- #visit(ctx, node : AST::Qualify)
- #visit(ctx, node : AST::Prefix)
- #visit(ctx, node : AST::Relate)