The src/object Directory

Namespace object, delivered from TC-1/2 to TC-EXTS. Wrappers around other modules accepting objects syntax.

File: local.am (src/object/)

This is a Makefile configuration relative to the src/object/ directory. It is responsible for the integration into the libtc library with everything exported from the object module, and the linkage of the directory’s unit tests in the test-suite.

File: libobject.* (src/object/)

The interface of the object module. It exports the bind, types_check, rename, desugar and raw_desugar procedures. Those are overloads accepting object-related constructs.

File: tasks.* (src/object/)

Tasks related to the object module (see: The src/task Directory).

File: fwd.hh (src/object/)

Forward declarations for the object module.


File: binder.* (src/object/)

Given at TC-3. The object::Binder visitor. Binds uses to definitions (works on syntax with objects). Inherits from bind::Binder.


File: type-checker.* (src/object/)

Given at TC-4. The object::TypeChecker visitor. Computes the types of an AST and adds type labels to the corresponding nodes (works on syntax with objects). Inherits from type::TypeChecker.

File: renamer.* (src/object/)

Given at TC-4. The object::Renamer visitor. Renames every identifier to a unique name (works on syntax with objects), and keeps a record of the names of the renamed classes. Inherits from bind::Renamer.


File: default-visitor.* (src/type/)

Given at TC-EXTS. Implementation of the GenDefaultVisitor class template, which walks the abstract syntax tree, doing nothing. This visitor does not define visit methods for nodes related to object-oriented constructs (classes, methods, etc.); thus it is an abstract class, and is solely used as a basis for deriving other visitors. It is instantiated twice: GenDefaultVisitor<misc::constify_traits> and GenDefaultVisitor<misc::id_traits>.

File: desugar-visitor.* (src/object/)

Given at TC-EXTS. The object::DesugarVisitor visitor. Transforms an AST with objects into an AST without objects.


File: test-*.cc (src/type/)

Unit tests.