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