The src/desugar
Directory
Namespace desugar
. Desugar string comparisons and for loops.
File: libdesugar.* (src/desugar/)
The interface of the
desugar
module. It exports thedesugar
andbounds_checks_add
procedures, as well as their raw counterparts which does not compute bindings and types andbind_and_types_check
which computes both.
File: desugar-visitor.* (src/desugar)
The
desugar::DesugarVisitor
visitor. Remove constructs that can be considered as syntactic sugar using other language constructs. For instance, turnfor
loops intowhile
loops, string comparisons into function calls. Inherits fromastclone::Cloner
, so the desugaredAST
is a modified copy of the initial tree.
File: bounds-checking-visitor.* (src/desugar)
The
desugar::BoundsCheckingVisitor
visitor. Add dynamic array bounds checks while duplicating anAST
. Inherits fromastclone::Cloner
, so the result is a modified copy of the inputAST
.