summaryrefslogtreecommitdiff
path: root/src/ast/nodes/BlockNode.java
diff options
context:
space:
mode:
authorgeno <gabriele.genovese2@studio.unibo.it>2024-06-30 13:36:37 +0200
committergeno <gabriele.genovese2@studio.unibo.it>2024-06-30 13:36:37 +0200
commitafff6a80cd58f7787efa1398f7c8cbdce8989323 (patch)
treee6021201d6e7049da640687c7ce61c898aaea4d8 /src/ast/nodes/BlockNode.java
parentaaa97e2e41c0aa17a6f99099dd39bb73a935fe02 (diff)
fixed warnings, better formatting, final added where possible
Diffstat (limited to 'src/ast/nodes/BlockNode.java')
-rw-r--r--src/ast/nodes/BlockNode.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/ast/nodes/BlockNode.java b/src/ast/nodes/BlockNode.java
index a38b4ea..d9a151d 100644
--- a/src/ast/nodes/BlockNode.java
+++ b/src/ast/nodes/BlockNode.java
@@ -1,23 +1,22 @@
package ast.nodes;
-import java.util.ArrayList;
-
import ast.types.*;
+import java.util.ArrayList;
import semanticanalysis.SemanticError;
import semanticanalysis.SymbolTable;
/**
- * Node for `block` statement of the grammar.
- * It extends the `RootNode`.
+ * Node for `block` statement of the grammar. It extends the `RootNode`.
*/
public class BlockNode extends RootNode {
+
public BlockNode(ArrayList<Node> childs) {
super(childs);
}
@Override
public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) {
- ArrayList<SemanticError> errors = new ArrayList<SemanticError>();
+ ArrayList<SemanticError> errors = new ArrayList();
// Check semantics for each child
for (Node child : childs) {
@@ -27,7 +26,6 @@ public class BlockNode extends RootNode {
return errors;
}
-
@Override
public Type typeCheck() {
return new VoidType();