Changeset 5f08961d for src/CodeGen/CodeGenerator.cc
- Timestamp:
- Apr 16, 2018, 4:48:43 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- a3323db1
- Parents:
- e93f1d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
re93f1d2 r5f08961d 116 116 } 117 117 118 CodeGenerator::CodeGenerator( std::ostream & os, bool pretty, bool genC, bool lineMarks ) : indent( CodeGenerator::tabsize ), output( os ), printLabels( *this ), pretty( pretty ), genC( genC ), lineMarks( lineMarks ), endl( *this ) {}118 CodeGenerator::CodeGenerator( std::ostream & os, bool pretty, bool genC, bool lineMarks, bool printExprTypes ) : indent( CodeGenerator::tabsize ), output( os ), printLabels( *this ), pretty( pretty ), genC( genC ), lineMarks( lineMarks ), printExprTypes( printExprTypes ), endl( *this ) {} 119 119 120 120 string CodeGenerator::mangleName( DeclarationWithType * decl ) { … … 157 157 node->print( ss ); 158 158 assertf( false, "Unhandled node reached in CodeGenerator: %s", ss.str().c_str() ); 159 } 160 161 // *** Expression 162 void CodeGenerator::previsit( Expression * node ) { 163 previsit( (BaseSyntaxNode *)node ); 164 GuardAction( [this, node](){ 165 if ( printExprTypes ) { 166 output << " /* " << genType( node->result, "", pretty, genC ) << " */ "; 167 } 168 } ); 159 169 } 160 170
Note: See TracChangeset
for help on using the changeset viewer.