The src/desugar Directory

Namespace desugar. Desugar string comparisons and for loops.

File: libdesugar.* (src/desugar/)

The interface of the desugar module. It exports the desugar and bounds_checks_add procedures, as well as their raw counterparts which does not compute bindings and types and bind_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, turn for loops into while loops, string comparisons into function calls. Inherits from astclone::Cloner, so the desugared AST 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 an AST. Inherits from astclone::Cloner, so the result is a modified copy of the input AST.