Changeset a32b204 for translator/Parser/StatementNode.cc
- Timestamp:
- May 17, 2015, 1:19:35 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 0dd3a2f
- Parents:
- b87a5ed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Parser/StatementNode.cc
rb87a5ed ra32b204 171 171 void StatementNode::print( std::ostream &os, int indent ) const { 172 172 if ( labels != 0 ) 173 if (! labels->empty()) {173 if (! labels->empty()) { 174 174 std::list<std::string>::const_iterator i; 175 175 176 176 os << '\r' << string( indent, ' '); 177 for ( i = labels->begin(); i != labels->end(); i++ )177 for ( i = labels->begin(); i != labels->end(); i++ ) 178 178 os << *i << ":"; 179 179 os << endl; 180 180 } 181 181 182 switch ( type ) {182 switch ( type ) { 183 183 case Decl: 184 184 decl->print( os, indent ); … … 232 232 buildList<Statement, StatementNode>( get_block(), branches ); 233 233 234 switch ( type ) {234 switch ( type ) { 235 235 case Decl: 236 236 return new DeclStmt( labs, maybeBuild< Declaration >( decl ) ); … … 251 251 thenb = branches.front(); 252 252 branches.pop_front(); 253 if ( ! branches.empty() ) {253 if ( ! branches.empty() ) { 254 254 elseb = branches.front(); 255 255 branches.pop_front();
Note: See TracChangeset
for help on using the changeset viewer.