Changes in src/SynTree/Mutator.cc [25a8631:e4d829b]
- File:
-
- 1 edited
-
src/SynTree/Mutator.cc (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Mutator.cc
r25a8631 re4d829b 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:43:00201713 // Update Count : 2 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Mar 30 16:45:19 2017 13 // Update Count : 22 14 14 // 15 15 … … 153 153 } 154 154 155 Statement *Mutator::mutate( ThrowStmt *throwStmt ) {156 throwStmt->set_expr( maybeMutate( throwStmt->get_expr(), *this ) );157 throwStmt->set_target( maybeMutate( throwStmt->get_target(), *this ) );158 return throwStmt;159 }160 161 155 Statement *Mutator::mutate( TryStmt *tryStmt ) { 162 156 tryStmt->set_block( maybeMutate( tryStmt->get_block(), *this ) ); 163 157 mutateAll( tryStmt->get_catchers(), *this ); 164 tryStmt->set_finally( maybeMutate( tryStmt->get_finally(), *this ) );165 158 return tryStmt; 166 159 } … … 168 161 Statement *Mutator::mutate( CatchStmt *catchStmt ) { 169 162 catchStmt->set_decl( maybeMutate( catchStmt->get_decl(), *this ) ); 170 catchStmt->set_cond( maybeMutate( catchStmt->get_cond(), *this ) );171 163 catchStmt->set_body( maybeMutate( catchStmt->get_body(), *this ) ); 172 164 return catchStmt; … … 382 374 } 383 375 376 Expression *Mutator::mutate( UntypedValofExpr *valofExpr ) { 377 valofExpr->set_env( maybeMutate( valofExpr->get_env(), *this ) ); 378 valofExpr->set_result( maybeMutate( valofExpr->get_result(), *this ) ); 379 return valofExpr; 380 } 381 384 382 Expression *Mutator::mutate( RangeExpr *rangeExpr ) { 385 383 rangeExpr->set_env( maybeMutate( rangeExpr->get_env(), *this ) ); … … 407 405 tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) ); 408 406 tupleExpr->set_tuple( maybeMutate( tupleExpr->get_tuple(), *this ) ); 407 return tupleExpr; 408 } 409 410 Expression *Mutator::mutate( MemberTupleExpr *tupleExpr ) { 411 tupleExpr->set_env( maybeMutate( tupleExpr->get_env(), *this ) ); 412 tupleExpr->set_result( maybeMutate( tupleExpr->get_result(), *this ) ); 413 tupleExpr->set_member( maybeMutate( tupleExpr->get_member(), *this ) ); 414 tupleExpr->set_aggregate( maybeMutate( tupleExpr->get_aggregate(), *this ) ); 409 415 return tupleExpr; 410 416 } … … 431 437 uniqueExpr->set_expr( maybeMutate( uniqueExpr->get_expr(), *this ) ); 432 438 return uniqueExpr; 439 } 440 441 Expression *Mutator::mutate( UntypedInitExpr * initExpr ) { 442 initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) ); 443 initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) ); 444 initExpr->set_expr( maybeMutate( initExpr->get_expr(), *this ) ); 445 // not currently mutating initAlts, but this doesn't matter since this node is only used in the resolver. 446 return initExpr; 447 } 448 449 Expression *Mutator::mutate( InitExpr * initExpr ) { 450 initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) ); 451 initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) ); 452 initExpr->set_expr( maybeMutate( initExpr->get_expr(), *this ) ); 453 initExpr->set_designation( maybeMutate( initExpr->get_designation(), *this ) ); 454 return initExpr; 433 455 } 434 456 … … 535 557 536 558 559 Designation *Mutator::mutate( Designation * designation ) { 560 mutateAll( designation->get_designators(), *this ); 561 return designation; 562 } 563 537 564 Initializer *Mutator::mutate( SingleInit *singleInit ) { 538 565 singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) ); … … 541 568 542 569 Initializer *Mutator::mutate( ListInit *listInit ) { 543 mutateAll( listInit->get_designat ors(), *this );570 mutateAll( listInit->get_designations(), *this ); 544 571 mutateAll( listInit->get_initializers(), *this ); 545 572 return listInit;
Note:
See TracChangeset
for help on using the changeset viewer.