From afff6a80cd58f7787efa1398f7c8cbdce8989323 Mon Sep 17 00:00:00 2001 From: geno Date: Sun, 30 Jun 2024 13:36:37 +0200 Subject: fixed warnings, better formatting, final added where possible --- src/ast/nodes/BlockNode.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/ast/nodes/BlockNode.java') 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 childs) { super(childs); } @Override public ArrayList checkSemantics(SymbolTable ST, int _nesting) { - ArrayList errors = new ArrayList(); + ArrayList 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(); -- cgit v1.2.3-18-g5258