feat(ClavaLaraApi): Return new scope of ForToWhileStmt
laraImport("clava.ClavaJoinPoints");
function ForToWhileStmt($forStmt) {
- $forStmt.replaceWith(
- ClavaJoinPoints.scope([
+ const $scope = ClavaJoinPoints.scope([
$forStmt.init,
ClavaJoinPoints.whileStmt(
$forStmt.cond,
ClavaJoinPoints.scope([...$forStmt.scopeNodes, $forStmt.step])
),
- ])
- );
+ ]);
+
+ $forStmt.replaceWith(scope);
+
+ return $scope;
}
