summaryrefslogtreecommitdiff
path: root/src/ast/nodes/BlockNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/nodes/BlockNode.java')
-rw-r--r--src/ast/nodes/BlockNode.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ast/nodes/BlockNode.java b/src/ast/nodes/BlockNode.java
index 6b07f49..2c85025 100644
--- a/src/ast/nodes/BlockNode.java
+++ b/src/ast/nodes/BlockNode.java
@@ -9,8 +9,8 @@ import ast.types.*;
* It extends the `RootNode`.
*/
public class BlockNode extends RootNode {
- public BlockNode(ArrayList<Node> stmts, ArrayList<Node> compoundStmts) {
- super(stmts, compoundStmts);
+ public BlockNode(ArrayList<Node> childs) {
+ super(childs);
}
@Override
@@ -23,11 +23,8 @@ public class BlockNode extends RootNode {
String str = prefix + "Block\n";
prefix += " ";
- for (Node stmt : stmts) {
- str += stmt.toPrint(prefix);
- }
- for (Node stmt : compoundStmts) {
- str += stmt.toPrint(prefix);
+ for (Node child : childs) {
+ str += child.toPrint(prefix);
}
return str;