summaryrefslogtreecommitdiff
path: root/st/TokenKey.java
diff options
context:
space:
mode:
authorbd-912 <bdunahu@colostate.edu>2024-04-25 13:52:13 -0600
committerbd-912 <bdunahu@colostate.edu>2024-04-25 13:52:13 -0600
commite7e8d7751690c80cd2dd681f548d069d053cf23e (patch)
tree6b70a921b4a4d85372d0fd609eb326e2043d2f6b /st/TokenKey.java
parentc28a1cc9d206bdde41a621b018c01980b3c8a617 (diff)
Fix first bugs in BoilVisitor for new SymbolTable
Diffstat (limited to 'st/TokenKey.java')
-rw-r--r--st/TokenKey.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/st/TokenKey.java b/st/TokenKey.java
index 54086c5..941c83f 100644
--- a/st/TokenKey.java
+++ b/st/TokenKey.java
@@ -29,11 +29,12 @@ public class TokenKey {
boolean ret = false;
TokenKey o;
if (other instanceof TokenKey &&
- (o = (TokenKey) other).name == this.name &&
- o.cls == this.cls &&
- o.mtd == this.mtd) {
+ (o = (TokenKey) other).name.equals(this.name) &&
+ ((o.cls == null && this.cls == null) ||
+ (o.cls != null && o.cls.equals(this.cls))) &&
+ ((o.mtd == null && this.mtd == null) ||
+ (o.mtd != null && o.mtd.equals(this.mtd))))
ret = true;
- }
return ret;
}