Changes in src/SynTree/Visitor.cc [ce8c12f:62423350]
- File:
-
- 1 edited
-
src/SynTree/Visitor.cc (modified) (14 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Visitor.cc
rce8c12f r62423350 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Mar 30 16:45:25201713 // Update Count : 2 411 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu Jun 22 13:41:00 2017 13 // Update Count : 26 14 14 // 15 15 … … 67 67 void Visitor::visit( TypeDecl *typeDecl ) { 68 68 handleNamedTypeDecl( static_cast< NamedTypeDecl* >( typeDecl ) ); 69 maybeAccept( typeDecl->get_init(), *this ); 69 70 } 70 71 … … 121 122 } 122 123 123 void Visitor::visit( BranchStmt *branchStmt ) {124 void Visitor::visit( __attribute__((unused)) BranchStmt *branchStmt ) { 124 125 } 125 126 126 127 void Visitor::visit( ReturnStmt *returnStmt ) { 127 128 maybeAccept( returnStmt->get_expr(), *this ); 129 } 130 131 void Visitor::visit( ThrowStmt * throwStmt ) { 132 maybeAccept( throwStmt->get_expr(), *this ); 133 maybeAccept( throwStmt->get_target(), *this ); 128 134 } 129 135 … … 131 137 maybeAccept( tryStmt->get_block(), *this ); 132 138 acceptAll( tryStmt->get_catchers(), *this ); 139 maybeAccept( tryStmt->get_finally(), *this ); 133 140 } 134 141 135 142 void Visitor::visit( CatchStmt *catchStmt ) { 136 143 maybeAccept( catchStmt->get_decl(), *this ); 144 maybeAccept( catchStmt->get_cond(), *this ); 137 145 maybeAccept( catchStmt->get_body(), *this ); 138 146 } … … 142 150 } 143 151 144 void Visitor::visit( NullStmt *nullStmt ) {152 void Visitor::visit( __attribute__((unused)) NullStmt *nullStmt ) { 145 153 } 146 154 … … 295 303 } 296 304 297 void Visitor::visit( UntypedValofExpr *valofExpr ) {298 maybeAccept( valofExpr->get_result(), *this );299 maybeAccept( valofExpr->get_body(), *this );300 }301 302 305 void Visitor::visit( RangeExpr *rangeExpr ) { 303 306 maybeAccept( rangeExpr->get_low(), *this ); … … 318 321 maybeAccept( tupleExpr->get_result(), *this ); 319 322 maybeAccept( tupleExpr->get_tuple(), *this ); 320 }321 322 void Visitor::visit( MemberTupleExpr *tupleExpr ) {323 maybeAccept( tupleExpr->get_result(), *this );324 maybeAccept( tupleExpr->get_member(), *this );325 maybeAccept( tupleExpr->get_aggregate(), *this );326 323 } 327 324 … … 343 340 } 344 341 342 void Visitor::visit( UntypedInitExpr * initExpr ) { 343 maybeAccept( initExpr->get_result(), *this ); 344 maybeAccept( initExpr->get_expr(), *this ); 345 // not currently visiting initAlts, but this doesn't matter since this node is only used in the resolver. 346 } 347 348 void Visitor::visit( InitExpr * initExpr ) { 349 maybeAccept( initExpr->get_result(), *this ); 350 maybeAccept( initExpr->get_expr(), *this ); 351 maybeAccept( initExpr->get_designation(), *this ); 352 } 353 345 354 346 355 void Visitor::visit( VoidType *voidType ) { … … 354 363 void Visitor::visit( PointerType *pointerType ) { 355 364 acceptAll( pointerType->get_forall(), *this ); 356 // xxx - should PointerType visit/mutate dimension?357 365 maybeAccept( pointerType->get_base(), *this ); 358 366 } … … 364 372 } 365 373 366 void Visitor::visit( ReferenceType *refType ) {367 acceptAll( refType->get_forall(), *this );368 maybeAccept( refType->get_base(), *this );369 }370 371 374 void Visitor::visit( FunctionType *functionType ) { 372 375 acceptAll( functionType->get_forall(), *this ); … … 404 407 acceptAll( tupleType->get_forall(), *this ); 405 408 acceptAll( tupleType->get_types(), *this ); 409 acceptAll( tupleType->get_members(), *this ); 406 410 } 407 411 … … 433 437 } 434 438 439 void Visitor::visit( Designation * designation ) { 440 acceptAll( designation->get_designators(), *this ); 441 } 435 442 436 443 void Visitor::visit( SingleInit *singleInit ) { … … 439 446 440 447 void Visitor::visit( ListInit *listInit ) { 441 acceptAll( listInit->get_designat ors(), *this );448 acceptAll( listInit->get_designations(), *this ); 442 449 acceptAll( listInit->get_initializers(), *this ); 443 450 } … … 450 457 451 458 452 void Visitor::visit( Subrange *subrange ) {}453 454 455 void Visitor::visit( Constant *constant ) {}459 void Visitor::visit( __attribute__((unused)) Subrange *subrange ) {} 460 461 462 void Visitor::visit( __attribute__((unused)) Constant *constant ) {} 456 463 // Local Variables: // 457 464 // tab-width: 4 //
Note:
See TracChangeset
for help on using the changeset viewer.