Changes in src/SynTree/Statement.cc [406a6e6:046e04a]
- File:
-
- 1 edited
-
src/SynTree/Statement.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Statement.cc
r406a6e6 r046e04a 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Aug 14 12:26:00 201713 // Update Count : 6 512 // Last Modified On : Mon Jun 12 10:37:00 2017 13 // Update Count : 64 14 14 // 15 15 … … 329 329 void TryStmt::print( std::ostream &os, int indent ) const { 330 330 os << "Try Statement" << endl; 331 os << string( indent + 2, ' ' ) << "with block:" << endl; 332 os << string( indent + 4, ' ' ); 331 os << string( indent + 2, ' ' ) << "with block: " << endl; 333 332 block->print( os, indent + 4 ); 334 333 335 334 // handlers 336 os << string( indent + 2, ' ' ) << "and handlers:" << endl; 337 for ( std::list<CatchStmt *>::const_iterator i = handlers.begin(); i != handlers.end(); i++) { 338 os << string( indent + 4, ' ' ); 335 os << string( indent + 2, ' ' ) << "and handlers: " << endl; 336 for ( std::list<CatchStmt *>::const_iterator i = handlers.begin(); i != handlers.end(); i++) 339 337 (*i )->print( os, indent + 4 ); 340 }341 338 342 339 // finally block 343 340 if ( finallyBlock != 0 ) { 344 os << string( indent + 2, ' ' ) << " and finally:" << endl;341 os << string( indent + 2, ' ' ) << "Finally block: " << endl; 345 342 finallyBlock->print( os, indent + 4 ); 346 343 } // if … … 363 360 os << "Catch " << ((Terminate == kind) ? "Terminate" : "Resume") << " Statement" << endl; 364 361 365 os << string( indent + 2, ' ' ) << "... catching: ";362 os << string( indent, ' ' ) << "... catching" << endl; 366 363 if ( decl ) { 367 364 decl->printShort( os, indent + 4 ); … … 370 367 else 371 368 os << string( indent + 4 , ' ' ) << ">>> Error: this catch clause must have a declaration <<<" << endl; 372 373 if ( cond ) {374 os << string( indent + 2, ' ' ) << "with conditional:" << endl;375 os << string( indent + 4, ' ' );376 cond->print( os, indent + 4 );377 }378 else379 os << string( indent + 2, ' ' ) << "with no conditional" << endl;380 381 os << string( indent + 2, ' ' ) << "with block:" << endl;382 os << string( indent + 4, ' ' );383 body->print( os, indent + 4 );384 369 } 385 370 … … 398 383 void FinallyStmt::print( std::ostream &os, int indent ) const { 399 384 os << "Finally Statement" << endl; 400 os << string( indent + 2, ' ' ) << "with block:" << endl; 401 os << string( indent + 4, ' ' ); 385 os << string( indent + 2, ' ' ) << "with block: " << endl; 402 386 block->print( os, indent + 4 ); 403 387 }
Note:
See TracChangeset
for help on using the changeset viewer.