Changeset e4d829b for src/SynTree/Mutator.cc
- Timestamp:
- Jun 20, 2017, 1:19:53 PM (7 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:
- 579263a
- Parents:
- c6d2e93
- git-author:
- Rob Schluntz <rschlunt@…> (06/20/17 13:16:13)
- git-committer:
- Rob Schluntz <rschlunt@…> (06/20/17 13:19:53)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Mutator.cc
rc6d2e93 re4d829b 439 439 } 440 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; 455 } 456 441 457 442 458 Type *Mutator::mutate( VoidType *voidType ) { … … 541 557 542 558 559 Designation *Mutator::mutate( Designation * designation ) { 560 mutateAll( designation->get_designators(), *this ); 561 return designation; 562 } 563 543 564 Initializer *Mutator::mutate( SingleInit *singleInit ) { 544 565 singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) ); … … 547 568 548 569 Initializer *Mutator::mutate( ListInit *listInit ) { 549 mutateAll( listInit->get_designat ors(), *this );570 mutateAll( listInit->get_designations(), *this ); 550 571 mutateAll( listInit->get_initializers(), *this ); 551 572 return listInit;
Note: See TracChangeset
for help on using the changeset viewer.