diff options
author | Santo Cariotti <santo@dcariotti.me> | 2024-06-30 13:45:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-30 13:45:57 +0200 |
commit | 8aa8b5834953cab15c0687608f4fafea2e6c61be (patch) | |
tree | 1835ae7c789136b4a6c44c12efd4247a0b96d893 /src/ast/nodes/WhileStmtNode.java | |
parent | 7125bb27fedaafd5a56b5122e4251b182448ddac (diff) | |
parent | 06d7c8dee25c065b1a569337f34d3cd5e892a31d (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/WhileStmtNode.java')
-rw-r--r-- | src/ast/nodes/WhileStmtNode.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ast/nodes/WhileStmtNode.java b/src/ast/nodes/WhileStmtNode.java index 6353ec1..1db01ea 100644 --- a/src/ast/nodes/WhileStmtNode.java +++ b/src/ast/nodes/WhileStmtNode.java @@ -1,17 +1,17 @@ package ast.nodes; +import ast.types.*; import java.util.ArrayList; - import semanticanalysis.SemanticError; import semanticanalysis.SymbolTable; -import ast.types.*; /** * Node for the `while_stmt` statement of the grammar. */ public class WhileStmtNode implements Node { - private Node expr; - private Node block; + + private final Node expr; + private final Node block; public WhileStmtNode(Node expr, Node block) { this.expr = expr; @@ -20,7 +20,7 @@ public class WhileStmtNode implements Node { @Override public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) { - ArrayList<SemanticError> errors = new ArrayList<SemanticError>(); + ArrayList<SemanticError> errors = new ArrayList(); errors.addAll(expr.checkSemantics(ST, _nesting)); errors.addAll(block.checkSemantics(ST, _nesting)); |