Remove token ID/Key distinction, part 11 of N

This commit is contained in:
Nigel Tao committed 2018-04-15 17:57:10 +10:00
1 parent b24a929ec7
commit eeebd58d7b
20 files changed
+1218 -1425

No files matched your search

+2 -2
View File
@@ -46,7 +46,7 @@ func (n *Expr) Eq(o *Expr) bool {
return false
}
if n.id0.Key() == t.KeyXBinaryAs {
if n.id0 == t.IDXBinaryAs {
if !n.rhs.TypeExpr().Eq(o.rhs.TypeExpr()) {
return false
}
@@ -72,7 +72,7 @@ func (n *Expr) Mentions(o *Expr) bool {
if n.Eq(o) ||
n.lhs.Expr().Mentions(o) ||
n.mhs.Expr().Mentions(o) ||
(n.id0.Key() != t.KeyXBinaryAs && n.rhs.Expr().Mentions(o)) {
(n.id0 != t.IDXBinaryAs && n.rhs.Expr().Mentions(o)) {
return true
}
for _, x := range n.list0 {