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/SimpleStmtsNode.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ast/nodes/SimpleStmtsNode.java') 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 stmts; + + private final ArrayList stmts; public SimpleStmtsNode(ArrayList stmts) { this.stmts = stmts; @@ -17,7 +18,7 @@ public class SimpleStmtsNode implements Node { @Override public ArrayList checkSemantics(SymbolTable ST, int _nesting) { - ArrayList errors = new ArrayList(); + ArrayList errors = new ArrayList(); for (Node stmt : stmts) { errors.addAll(stmt.checkSemantics(ST, _nesting)); -- cgit v1.2.3-18-g5258