summaryrefslogtreecommitdiff
path: root/src/ast/nodes/SimpleStmtNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast/nodes/SimpleStmtNode.java')
-rw-r--r--src/ast/nodes/SimpleStmtNode.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ast/nodes/SimpleStmtNode.java b/src/ast/nodes/SimpleStmtNode.java
index b7e5455..b2bc880 100644
--- a/src/ast/nodes/SimpleStmtNode.java
+++ b/src/ast/nodes/SimpleStmtNode.java
@@ -9,10 +9,11 @@ import semanticanalysis.SymbolTable;
* Node for the `simple_stmt` statement of the grammar.
*/
public class SimpleStmtNode implements Node {
- private Node assignment;
- private Node expr;
- private Node returnStmt;
- private Node importStmt;
+
+ private final Node assignment;
+ private final Node expr;
+ private final Node returnStmt;
+ private final Node importStmt;
public SimpleStmtNode(Node assignment, Node expr, Node returnStmt, Node importStmt) {
this.assignment = assignment;
@@ -23,7 +24,7 @@ public class SimpleStmtNode implements Node {
@Override
public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) {
- ArrayList<SemanticError> errors = new ArrayList<SemanticError>();
+ ArrayList<SemanticError> errors = new ArrayList();
if (assignment != null) {
errors.addAll(assignment.checkSemantics(ST, _nesting));