Changeset 1cdfa82 for src/Parser/StatementNode.cc
- Timestamp:
- Apr 25, 2018, 4:55:53 PM (7 years ago)
- Branches:
- new-env, with_gc
- Children:
- 42107b4
- Parents:
- 2efe4b8 (diff), 9d5fb67 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/StatementNode.cc
r2efe4b8 r1cdfa82 10 10 // Created On : Sat May 16 14:59:41 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Sep 1 23:25:23 201713 // Update Count : 34 612 // Last Modified On : Thu Mar 8 14:31:32 2018 13 // Update Count : 348 14 14 // 15 15 … … 115 115 } 116 116 117 Statement *build_switch( ExpressionNode *ctl, StatementNode *stmt ) {117 Statement *build_switch( bool isSwitch, ExpressionNode *ctl, StatementNode *stmt ) { 118 118 std::list< Statement * > branches; 119 119 buildMoveList< Statement, StatementNode >( stmt, branches ); 120 if ( ! isSwitch ) { // choose statement 121 for ( Statement * stmt : branches ) { 122 CaseStmt * caseStmt = strict_dynamic_cast< CaseStmt * >( stmt ); 123 if ( ! caseStmt->stmts.empty() ) { // code after "case" => end of case list 124 CompoundStmt * block = strict_dynamic_cast< CompoundStmt * >( caseStmt->stmts.front() ); 125 block->kids.push_back( new BranchStmt( "", BranchStmt::Break ) ); 126 } // if 127 } // for 128 } // if 120 129 // branches.size() == 0 for switch (...) {}, i.e., no declaration or statements 121 130 return new SwitchStmt( maybeMoveBuild< Expression >(ctl), branches );
Note: See TracChangeset
for help on using the changeset viewer.