The src/desugar Directory
Namespace desugar, delivered during TC-D and TC-EXTS.
Desugar string comparisons and for loops.
File: local.am (src/desugar/)
The Makefile configuration relative to the
src/desugar/directory. It is responsible for the integration into thelibtclibrary with everything exported from thedesugarmodule, and the linkage of the directory’s unit tests in the test-suite.
File: libdesugar.* (src/desugar/)
The interface of the
desugarmodule. It exports thedesugarandbounds_checks_addprocedures, as well as their raw counterparts which does not compute bindings and types andbind_and_types_checkwhich computes both.
File: tasks.* (src/desugar/)
The tasks relative to the
desugarmodule (see: The src/task Directory).
File: desugar-visitor.* (src/desugar/)
The
desugar::DesugarVisitorvisitor. Removes constructs that can be considered as syntactic sugar using other language constructs. For instance, turnsforloops intowhileloops, string comparisons into function calls. Inherits fromastclone::Cloner, so the desugaredASTis a modified copy of the initial tree.
File: bounds-checking-visitor.* (src/desugar/)
Given at TC-EXTS. The
desugar::BoundsCheckingVisitorvisitor adds dynamic array bounds checks while duplicating anAST. Inherits fromastclone::Cloner, so the result is a modified copy of the inputAST.
File: test-*.cc (src/desugar/)
The unit tests.