diff options
Diffstat (limited to 'src/ast/nodes/TrailerNode.java')
-rw-r--r-- | src/ast/nodes/TrailerNode.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ast/nodes/TrailerNode.java b/src/ast/nodes/TrailerNode.java index 22e43a0..aaa72f3 100644 --- a/src/ast/nodes/TrailerNode.java +++ b/src/ast/nodes/TrailerNode.java @@ -12,11 +12,11 @@ import org.antlr.v4.runtime.tree.TerminalNode; */ public class TrailerNode implements Node { - private Node arglist; - private ArrayList<Node> exprs; - private TerminalNode methodCall; - private boolean isParenthesis; - private boolean isEmpty; + private final Node arglist; + private final ArrayList<Node> exprs; + private final TerminalNode methodCall; + private final boolean isParenthesis; + private final boolean isEmpty; public TrailerNode(Node arglist, ArrayList<Node> exprs, TerminalNode methodCall, boolean isParenthesis) { this.arglist = arglist; @@ -24,12 +24,12 @@ public class TrailerNode implements Node { this.methodCall = methodCall; this.isParenthesis = isParenthesis; - this.isEmpty = (this.arglist == null && this.exprs.size() == 0 && this.methodCall == null); + this.isEmpty = (this.arglist == null && this.exprs.isEmpty() && this.methodCall == null); } @Override public ArrayList<SemanticError> checkSemantics(SymbolTable ST, int _nesting) { - ArrayList<SemanticError> errors = new ArrayList<SemanticError>(); + ArrayList<SemanticError> errors = new ArrayList(); if (arglist != null) { errors.addAll(arglist.checkSemantics(ST, _nesting)); |