operator-length.go: the prefix operator '#' now accept iterator oeprand; it returns the index of the current item

This commit is contained in:
Celestino Amoroso 2024-04-26 08:04:55 +02:00
parent a22047e84e
commit 107ec4958f

View File

@ -29,9 +29,8 @@ func evalLength(ctx ExprContext, self *term) (v any, err error) {
} else if isString(rightValue) { } else if isString(rightValue) {
s, _ := rightValue.(string) s, _ := rightValue.(string)
v = len(s) v = len(s)
// } else { } else if it, ok := rightValue.(Iterator); ok {
// v = 1 v = it.Index()
// }
} else { } else {
err = self.errIncompatibleType(rightValue) err = self.errIncompatibleType(rightValue)
} }