Changeset 67fa9f9 for src/SynTree/Mutator.cc
- Timestamp:
- Jul 5, 2017, 10:50:22 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 0614d14
- Parents:
- 11dbfe1 (diff), 307a732 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Mutator.cc
r11dbfe1 r67fa9f9 433 433 } 434 434 435 Expression *Mutator::mutate( UntypedInitExpr * initExpr ) { 436 initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) ); 437 initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) ); 438 initExpr->set_expr( maybeMutate( initExpr->get_expr(), *this ) ); 439 // not currently mutating initAlts, but this doesn't matter since this node is only used in the resolver. 440 return initExpr; 441 } 442 443 Expression *Mutator::mutate( InitExpr * initExpr ) { 444 initExpr->set_env( maybeMutate( initExpr->get_env(), *this ) ); 445 initExpr->set_result( maybeMutate( initExpr->get_result(), *this ) ); 446 initExpr->set_expr( maybeMutate( initExpr->get_expr(), *this ) ); 447 initExpr->set_designation( maybeMutate( initExpr->get_designation(), *this ) ); 448 return initExpr; 449 } 450 435 451 436 452 Type *Mutator::mutate( VoidType *voidType ) { … … 499 515 mutateAll( tupleType->get_forall(), *this ); 500 516 mutateAll( tupleType->get_types(), *this ); 517 mutateAll( tupleType->get_members(), *this ); 501 518 return tupleType; 502 519 } … … 535 552 536 553 554 Designation *Mutator::mutate( Designation * designation ) { 555 mutateAll( designation->get_designators(), *this ); 556 return designation; 557 } 558 537 559 Initializer *Mutator::mutate( SingleInit *singleInit ) { 538 560 singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) ); … … 541 563 542 564 Initializer *Mutator::mutate( ListInit *listInit ) { 543 mutateAll( listInit->get_designat ors(), *this );565 mutateAll( listInit->get_designations(), *this ); 544 566 mutateAll( listInit->get_initializers(), *this ); 545 567 return listInit;
Note:
See TracChangeset
for help on using the changeset viewer.