Ignore:
Timestamp:
Jun 20, 2017, 1:19:53 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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)
Message:

major effort on designations, works in many cases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Mutator.cc

    rc6d2e93 re4d829b  
    439439}
    440440
     441Expression *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
     449Expression *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
    441457
    442458Type *Mutator::mutate( VoidType *voidType ) {
     
    541557
    542558
     559Designation *Mutator::mutate( Designation * designation ) {
     560        mutateAll( designation->get_designators(), *this );
     561        return designation;
     562}
     563
    543564Initializer *Mutator::mutate( SingleInit *singleInit ) {
    544565        singleInit->set_value( singleInit->get_value()->acceptMutator( *this ) );
     
    547568
    548569Initializer *Mutator::mutate( ListInit *listInit ) {
    549         mutateAll( listInit->get_designators(), *this );
     570        mutateAll( listInit->get_designations(), *this );
    550571        mutateAll( listInit->get_initializers(), *this );
    551572        return listInit;
Note: See TracChangeset for help on using the changeset viewer.