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
+4 -4
View File
@@ -18,10 +18,10 @@ func newBuiltinTerm(tk *Token) (inst *term) {
}
}
func evalBuiltin(ctx ExprContext, self *term) (v any, err error) {
func evalBuiltin(ctx ExprContext, opTerm *term) (v any, err error) {
var childValue any
if childValue, err = self.evalPrefix(ctx); err != nil {
if childValue, err = opTerm.evalPrefix(ctx); err != nil {
return
}
@@ -37,11 +37,11 @@ func evalBuiltin(ctx ExprContext, self *term) (v any, err error) {
if ImportInContext(module) {
count++
} else {
err = self.Errorf("unknown builtin module %q", module)
err = opTerm.Errorf("unknown builtin module %q", module)
break
}
} else {
err = self.Errorf("expected string at item nr %d, got %s", it.Index()+1, TypeName(moduleSpec))
err = opTerm.Errorf("expected string at item nr %d, got %s", it.Index()+1, TypeName(moduleSpec))
break
}
}