summaryrefslogtreecommitdiff
path: root/src/ast/nodes/ExprNode.java
diff options
context:
space:
mode:
authorgeno <gabriele.genovese2@studio.unibo.it>2024-06-30 13:36:37 +0200
committergeno <gabriele.genovese2@studio.unibo.it>2024-06-30 13:36:37 +0200
commitafff6a80cd58f7787efa1398f7c8cbdce8989323 (patch)
treee6021201d6e7049da640687c7ce61c898aaea4d8 /src/ast/nodes/ExprNode.java
parentaaa97e2e41c0aa17a6f99099dd39bb73a935fe02 (diff)
fixed warnings, better formatting, final added where possible
Diffstat (limited to 'src/ast/nodes/ExprNode.java')
-rw-r--r--src/ast/nodes/ExprNode.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ast/nodes/ExprNode.java b/src/ast/nodes/ExprNode.java
index 8e3b896..873d537 100644
--- a/src/ast/nodes/ExprNode.java
+++ b/src/ast/nodes/ExprNode.java
@@ -12,11 +12,11 @@ import semanticanalysis.SymbolTable;
*/
public class ExprNode implements Node {
- private AtomNode atom;
- private Node compOp;
- private String op;
- private ArrayList<Node> exprs;
- private ArrayList<Node> trailers;
+ private final AtomNode atom;
+ private final Node compOp;
+ private final String op;
+ private final ArrayList<Node> exprs;
+ private final ArrayList<Node> trailers;
public ExprNode(Node atom, Node compOp, ArrayList<Node> exprs, String op, ArrayList<Node> trailers) {
this.atom = (AtomNode) atom;
@@ -52,7 +52,7 @@ public class ExprNode implements Node {
@Override
public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) {
- ArrayList<SemanticError> errors = new ArrayList<SemanticError>();
+ ArrayList<SemanticError> errors = new ArrayList();
// check if the atom is a function
if (atom != null && !trailers.isEmpty()) {