self param replaced as opTerm

This commit is contained in:
2024-07-09 07:50:06 +02:00
parent 867806155e
commit 6b3bfa2a11
31 changed files with 159 additions and 180 deletions
+3 -3
View File
@@ -18,17 +18,17 @@ func newNotTerm(tk *Token) (inst *term) {
}
}
func evalNot(ctx ExprContext, self *term) (v any, err error) {
func evalNot(ctx ExprContext, opTerm *term) (v any, err error) {
var rightValue any
if rightValue, err = self.evalPrefix(ctx); err != nil {
if rightValue, err = opTerm.evalPrefix(ctx); err != nil {
return
}
if b, ok := ToBool(rightValue); ok {
v = !b
} else {
err = self.errIncompatibleType(rightValue)
err = opTerm.errIncompatibleType(rightValue)
}
return
}