Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r71d0eab rc453ac4  
    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.