summaryrefslogtreecommitdiff
path: root/src/ast/nodes/SimpleStmtsNode.java
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2024-06-30 13:45:57 +0200
committerGitHub <noreply@github.com>2024-06-30 13:45:57 +0200
commit8aa8b5834953cab15c0687608f4fafea2e6c61be (patch)
tree1835ae7c789136b4a6c44c12efd4247a0b96d893 /src/ast/nodes/SimpleStmtsNode.java
parent7125bb27fedaafd5a56b5122e4251b182448ddac (diff)
parent06d7c8dee25c065b1a569337f34d3cd5e892a31d (diff)
Merge pull request #10 from boozec/check-semantics
Co-Authored-By: geno <gabriele.genovese2@studio.unibo.it> Co-Authored-By: L0P0P <grassoemanuele@live.com>
Diffstat (limited to 'src/ast/nodes/SimpleStmtsNode.java')
-rw-r--r--src/ast/nodes/SimpleStmtsNode.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ast/nodes/SimpleStmtsNode.java b/src/ast/nodes/SimpleStmtsNode.java
index 66c8e2c..ae1044b 100644
--- a/src/ast/nodes/SimpleStmtsNode.java
+++ b/src/ast/nodes/SimpleStmtsNode.java
@@ -1,16 +1,16 @@
package ast.nodes;
+import ast.types.*;
import java.util.ArrayList;
-
import semanticanalysis.SemanticError;
import semanticanalysis.SymbolTable;
-import ast.types.*;
/**
* 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;
@@ -18,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));