Changeset 7a8de40 for src/Parser
- Timestamp:
- Sep 1, 2025, 9:49:24 PM (3 weeks ago)
- Branches:
- master
- Children:
- 9f385e4
- Parents:
- 567a75f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/StatementNode.cpp
r567a75f r7a8de40 11 11 // Created On : Sat May 16 14:59:41 2015 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Thu Feb 6 11:38:39202514 // Update Count : 43 413 // Last Modified On : Sat Apr 19 13:01:31 2025 14 // Update Count : 436 15 15 // 16 16 … … 119 119 } // build_expr 120 120 121 static ast::Expr * build_if_control( CondCtrl * ctrl, 122 std::vector<ast::ptr<ast::Stmt>> & inits ) { 121 static ast::Expr * build_if_control( CondCtrl * ctrl, std::vector<ast::ptr<ast::Stmt>> & inits ) { 123 122 assert( inits.empty() ); 124 123 if ( nullptr != ctrl->init ) { … … 149 148 ast::Stmt const * astelse = buildMoveOptional( else_ ); 150 149 151 return new ast::IfStmt( location, astcond, astthen, astelse, 152 std::move( astinit ) 153 ); 150 return new ast::IfStmt( location, astcond, astthen, astelse, std::move( astinit ) ); 154 151 } // build_if 155 152 … … 193 190 ast::Expr * astcond = build_if_control( ctrl, astinit ); // ctrl deleted, cond/init set 194 191 195 return new ast::WhileDoStmt( location, 196 astcond, 197 buildMoveSingle( stmt ), 198 buildMoveOptional( else_ ), 199 std::move( astinit ), 200 ast::While 201 ); 192 return new ast::WhileDoStmt( location, astcond, buildMoveSingle( stmt ), buildMoveOptional( else_ ), 193 std::move( astinit ), ast::While ); 202 194 } // build_while 203 195
Note:
See TracChangeset
for help on using the changeset viewer.