Changeset fca78f1 for src/Parser/StatementNode.cpp
- Timestamp:
- Sep 23, 2024, 11:14:56 AM (6 weeks ago)
- Branches:
- master
- Children:
- 738a9b4
- Parents:
- b723b63
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/StatementNode.cpp
rb723b63 rfca78f1 213 213 if ( forctl->range_over ) { 214 214 ast::Expr * range_over = maybeMoveBuild( forctl->range_over ); 215 auto kind = forctl->kind; // save before delete, used in return 215 bool isIncreasing = forctl->kind == OperKinds::LEThan; 216 // Copy all the data needed before the delete. 216 217 delete forctl; 217 return new ast::For Stmt( location,218 return new ast::ForeachStmt( location, 218 219 std::move( astinit ), 219 range_over, kind == OperKinds::LEThan, 220 range_over, 221 isIncreasing ? ast::IncreasingRange : ast::DecreasingRange, 220 222 buildMoveSingle( stmt ), 221 223 buildMoveOptional( else_ )
Note: See TracChangeset
for help on using the changeset viewer.