The src/desugar
Directory
Namespace desugar
, delivered during TC-D and TC-EXTS.
Desugar string comparisons and for loops.
File: local.am (src/desugar/)
This is a Makefile configuration relative to the
src/desugar/
directory. It is responsible for the integration into thelibtc
library with everything exported from thedesugar
module, and the linkage of the directory’s unit tests in the test-suite.
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: tasks.* (src/desugar/)
Tasks related to the
desugar
module (see: The src/task Directory).
File: desugar-visitor.* (src/desugar/)
The
desugar::DesugarVisitor
visitor. Removes constructs that can be considered as syntactic sugar using other language constructs. For instance, turnsfor
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/)
Given at TC-EXTS. The
desugar::BoundsCheckingVisitor
visitor 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/)
Unit tests.