[ClavaAst] Adds support for definining init, cond and step in loops
For now this only accepts literal statements.
@@ -101,4 +101,18 @@ public class ForStmt extends LoopStmt {
return getCond().map(node -> (ClavaNode) node);
}
+ public void setInit(LiteralStmt literalStmt) {
+
+ setChild(0, literalStmt);
+ }
+
+ public void setCond(LiteralStmt literalStmt) {
+
+ setChild(1, literalStmt);
+ }
+
+ public void setInc(LiteralStmt literalStmt) {
+
+ setChild(2, literalStmt);
+ }
}
