TC-3 Code to Write¶
See The src/ast Directory, The src/bind Directory and Scoped Map.
- misc::scoped_map<Key, Data>
Complete the class template
misc::scoped_mapinlib/misc/scoped-map.hhandlib/misc/scoped-map.hxx. See scoped_map for more details.- Equip ast
Augment constructs “using” an identifier, such as
CallExp, withdef_,def_get, anddef_setto be able to set a reference to their definition, here aFunctionDec.- ast::PrettyPrinter
Implement
--bindings-displaysupport in thePrettyPrinter. You must strictly follow the format specified at TC-3 Samples when displaying binding addresses.- Complete the bind::Binder
Most of the assignment is here…
- Complete the object::Binder
…and here.
object::Binderinherits frombind::Binderso as to factor common parts.- Implement renaming to unique identifiers.
TC-R is a core assignment. Once TC-3 completed, implementing TC-R is straightforward, see TC-R, Unique Identifiers. Note that
--renameis helpful to write a test suite for TC-3.- Complete auxiliary code
Write the tasks,
libbind.*etc.