Changes in src/Parser/StatementNode.cc [837a17c:c0aa336]
- File:
-
- 1 edited
-
src/Parser/StatementNode.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/StatementNode.cc
r837a17c rc0aa336 10 10 // Created On : Sat May 16 14:59:41 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sun Aug 21 11:59:37 201613 // Update Count : 32 512 // Last Modified On : Thu Feb 2 22:16:40 2017 13 // Update Count : 327 14 14 // 15 15 … … 28 28 29 29 StatementNode::StatementNode( DeclarationNode *decl ) { 30 if ( decl ) { 31 DeclarationNode *agg = decl->extractAggregate(); 32 if ( agg ) { 33 StatementNode *nextStmt = new StatementNode( new DeclStmt( noLabels, maybeBuild< Declaration >( decl ) ) ); 34 set_next( nextStmt ); 35 if ( decl->get_next() ) { 36 get_next()->set_next( new StatementNode( dynamic_cast< DeclarationNode * >(decl->get_next()) ) ); 37 decl->set_next( 0 ); 38 } // if 39 } else { 40 if ( decl->get_next() ) { 41 set_next(new StatementNode( dynamic_cast< DeclarationNode * >( decl->get_next() ) ) ); 42 decl->set_next( 0 ); 43 } // if 44 agg = decl; 30 assert( decl ); 31 DeclarationNode *agg = decl->extractAggregate(); 32 if ( agg ) { 33 StatementNode *nextStmt = new StatementNode( new DeclStmt( noLabels, maybeBuild< Declaration >( decl ) ) ); 34 set_next( nextStmt ); 35 if ( decl->get_next() ) { 36 get_next()->set_next( new StatementNode( dynamic_cast< DeclarationNode * >(decl->get_next()) ) ); 37 decl->set_next( 0 ); 45 38 } // if 46 stmt.reset( new DeclStmt( noLabels, maybeMoveBuild< Declaration >(agg) ) );47 39 } else { 48 assert( false ); 40 if ( decl->get_next() ) { 41 set_next( new StatementNode( dynamic_cast< DeclarationNode * >( decl->get_next() ) ) ); 42 decl->set_next( 0 ); 43 } // if 44 agg = decl; 49 45 } // if 50 } 46 stmt.reset( new DeclStmt( noLabels, maybeMoveBuild< Declaration >(agg) ) ); 47 } // StatementNode::StatementNode 51 48 52 49 StatementNode *StatementNode::append_last_case( StatementNode *stmt ) {
Note:
See TracChangeset
for help on using the changeset viewer.