Next: , Previous: , Up: TC-E   [Contents][Index]


4.7.4 TC-E Code to Write

See src/ast, and src/escapes.

ast::PrettyPrinter

Implement --escapes-display support in the PrettyPrinter. Follow strictly the output format, since we parse your output to check it. Display the ‘/* escaping */’ flag where needed, and only where needed: each definition of an escaping variable/formal is preceded by the comment ‘/* escaping */’. Do not display meaningless flags due to implementation details. How this pretty-printing is implemented is left to you, but factor common code.

escapes::EscapesVisitor

Write the class escapes::EscapesVisitor in src/escapes/escapes-visitor.hh and src/escapes/escapes-visitor.cc.

Introduce ast::Escapable

Ensure ast::VarDec inherits from ast::Escapable. See Escapable.