Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ScopeComparer = cmp.Comparer(func(l, r values.Scope) bool { for { if l == nil && r == nil { return true } if l == nil && r != nil || l != nil && r == nil { return false } equal := true l.LocalRange(func(k string, lv values.Value) { rv, ok := r.LocalLookup(k) if lv.PolyType().Nature() == semantic.Function { equal = equal && ok && lv.PolyType().Equal(rv.PolyType()) } else { equal = equal && ok && lv.Equal(rv) } }) if !equal { return false } r.LocalRange(func(k string, rv values.Value) { _, ok := l.LocalLookup(k) equal = equal && ok }) if !equal { return false } l = l.Pop() r = r.Pop() } })
ScopeComparer checks that two scopes are equal in both nesting and contents. Functions cannot be compared for equality so only function types are checked.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.