diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-11 21:48:50 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-11 21:48:50 -0400 |
| commit | 57f9a3bfdad20bead5b35ee540e8790e80a6b9a4 (patch) | |
| tree | 1e7184825eaa8d22077b505513df3e0d8502fb39 /dice-lang/src/bjc/dicelang/Node.java | |
| parent | 675ae734dd7b7a47d93ee3527dd1eb7195be047b (diff) | |
Cleanup
Diffstat (limited to 'dice-lang/src/bjc/dicelang/Node.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/Node.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/dice-lang/src/bjc/dicelang/Node.java b/dice-lang/src/bjc/dicelang/Node.java index f58cb14..af26870 100644 --- a/dice-lang/src/bjc/dicelang/Node.java +++ b/dice-lang/src/bjc/dicelang/Node.java @@ -18,29 +18,29 @@ public class Node { public GroupType groupType; public EvaluatorResult resultVal; - public Node(Type typ) { + public Node(final Type typ) { type = typ; } - public Node(Type typ, Token tokenVl) { + public Node(final Type typ, final Token tokenVl) { this(typ); tokenVal = tokenVl; } - public Node(Type typ, Token.Type opType) { + public Node(final Type typ, final Token.Type opType) { this(typ); operatorType = opType; } - public Node(Type typ, GroupType grupType) { + public Node(final Type typ, final GroupType grupType) { this(typ); groupType = grupType; } - public Node(Type typ, EvaluatorResult res) { + public Node(final Type typ, final EvaluatorResult res) { this(typ); resultVal = res; @@ -48,7 +48,7 @@ public class Node { @Override public String toString() { - switch(type) { + switch (type) { case UNARYOP: case BINOP: return "(" + type.name() + " : " + operatorType + ")"; @@ -65,14 +65,14 @@ public class Node { } @Override - public boolean equals(Object other) { - if(!(other instanceof Node)) return false; + public boolean equals(final Object other) { + if (!(other instanceof Node)) return false; - Node otk = (Node) other; + final Node otk = (Node) other; - if(otk.type != type) return false; + if (otk.type != type) return false; - switch(type) { + switch (type) { case OGROUP: return tokenVal.equals(otk.tokenVal); default: |
