diff options
Diffstat (limited to 'src/ast/nodes/SimpleStmtsNode.java')
-rw-r--r-- | src/ast/nodes/SimpleStmtsNode.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ast/nodes/SimpleStmtsNode.java b/src/ast/nodes/SimpleStmtsNode.java index 97bffff..ae1044b 100644 --- a/src/ast/nodes/SimpleStmtsNode.java +++ b/src/ast/nodes/SimpleStmtsNode.java @@ -9,7 +9,8 @@ import semanticanalysis.SymbolTable; * Node for the `simple_stmts` statement of the grammar. */ public class SimpleStmtsNode implements Node { - private ArrayList<Node> stmts; + + private final ArrayList<Node> stmts; public SimpleStmtsNode(ArrayList<Node> stmts) { this.stmts = stmts; @@ -17,7 +18,7 @@ public class SimpleStmtsNode implements Node { @Override public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) { - ArrayList<SemanticError> errors = new ArrayList<SemanticError>(); + ArrayList<SemanticError> errors = new ArrayList(); for (Node stmt : stmts) { errors.addAll(stmt.checkSemantics(ST, _nesting)); |