Ignore:
Timestamp:
Feb 1, 2018, 5:40:01 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
0188a0bc
Parents:
d0a045c7 (diff), 33c0ce8 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rd0a045c7 r85521c7  
    723723}
    724724
    725 DeclarationNode * DeclarationNode::addFunctionBody( StatementNode * body, StatementNode * with ) {
     725DeclarationNode * DeclarationNode::addFunctionBody( StatementNode * body, ExpressionNode * withExprs ) {
    726726        assert( type );
    727727        assert( type->kind == TypeData::Function );
    728728        assert( ! type->function.body );
    729         if ( with ) {
    730                 // convert
    731                 //  void f(S s) with (s) { x = 0; }
    732                 // to
    733                 //  void f(S s) { with(s) { x = 0; } }
    734                 WithStmt * withStmt = strict_dynamic_cast< WithStmt * >( with->build() );
    735                 withStmt->stmt = body->build();
    736                 delete body;
    737                 delete with;
    738                 body = new StatementNode( new CompoundStmt( { withStmt } ) );
    739         }
    740729        type->function.body = body;
     730        type->function.withExprs = withExprs;
    741731        return this;
    742732}
Note: See TracChangeset for help on using the changeset viewer.