[ClavaAst] Adds LoopStmt.setBody()
@@ -59,6 +59,17 @@ public abstract class LoopStmt extends Stmt implements StmtWithCondition {
public abstract CompoundStmt getBody();
+ public CompoundStmt setBody(CompoundStmt newBody) {
+
+ // Replace body statement
+ CompoundStmt oldBody = getBody();
+ int bodyIndex = oldBody.indexOfSelf();
+
+ setChild(bodyIndex, newBody);
+
+ return oldBody;
+ }
+
public boolean isParallel() {
return isParallel;
}
