TC-E Code to Write
See The src/ast Directory and The src/escapes Directory.
- src/ast/pretty-printer.*
Implement
--escapes-display
support in thePrettyPrinter
. 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.- src/ast/escapable.*
Ensure
ast::VarDec
inherits fromast::Escapable
. See Escapable.- src/escapes/escapes-visitor.*
Write the class
escapes::EscapesVisitor
insrc/escapes/escapes-visitor.hh
andsrc/escapes/escapes-visitor.cc
. Do not forget to useast::DefaultVisitor
to factor as much code as possible.