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/Token.java | |
| parent | 675ae734dd7b7a47d93ee3527dd1eb7195be047b (diff) | |
Cleanup
Diffstat (limited to 'dice-lang/src/bjc/dicelang/Token.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/Token.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/dice-lang/src/bjc/dicelang/Token.java b/dice-lang/src/bjc/dicelang/Token.java index 1e5f356..22df90b 100644 --- a/dice-lang/src/bjc/dicelang/Token.java +++ b/dice-lang/src/bjc/dicelang/Token.java @@ -45,29 +45,29 @@ public class Token { // TAG* (the tagged construct) public IList<Token> tokenValues; - public Token(Type typ) { + public Token(final Type typ) { type = typ; } - public Token(Type typ, long val) { + public Token(final Type typ, final long val) { this(typ); intValue = val; } - public Token(Type typ, double val) { + public Token(final Type typ, final double val) { this(typ); floatValue = val; } - public Token(Type typ, DieExpression val) { + public Token(final Type typ, final DieExpression val) { this(typ); diceValue = val; } - public Token(Type typ, IList<Token> tkVals) { + public Token(final Type typ, final IList<Token> tkVals) { this(typ); tokenValues = tkVals; @@ -75,7 +75,7 @@ public class Token { @Override public String toString() { - switch(type) { + switch (type) { case INT_LIT: case STRING_LIT: case VREF: @@ -100,14 +100,14 @@ public class Token { } @Override - public boolean equals(Object other) { - if(!(other instanceof Token)) return false; + public boolean equals(final Object other) { + if (!(other instanceof Token)) return false; - Token otk = (Token) other; + final Token otk = (Token) other; - if(otk.type != type) return false; + if (otk.type != type) return false; - switch(type) { + switch (type) { case OBRACE: case OBRACKET: return intValue == otk.intValue; @@ -117,7 +117,7 @@ public class Token { } public boolean isGrouper() { - switch(type) { + switch (type) { case OPAREN: case OBRACE: case OBRACKET: |
