Changes in src/Parser/DeclarationNode.cc [5fcba14:c38ae92]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r5fcba14 rc38ae92 717 717 } 718 718 719 DeclarationNode * DeclarationNode::addFunctionBody( StatementNode * body , StatementNode * with) {719 DeclarationNode * DeclarationNode::addFunctionBody( StatementNode * body ) { 720 720 assert( type ); 721 721 assert( type->kind == TypeData::Function ); 722 722 assert( ! type->function.body ); 723 if ( with ) {724 // convert725 // void f(S s) with (s) { x = 0; }726 // to727 // void f(S s) { with(s) { x = 0; } }728 WithStmt * withStmt = strict_dynamic_cast< WithStmt * >( with->build() );729 withStmt->stmt = body->build();730 delete body;731 delete with;732 body = new StatementNode( new CompoundStmt( { withStmt } ) );733 }734 723 type->function.body = body; 735 724 return this;
Note:
See TracChangeset
for help on using the changeset viewer.