Changed SetValue() as SetVar() and GetValue() as GetVar()

This commit is contained in:
2024-04-03 06:29:57 +02:00
parent 6c02b02d4a
commit 088e347c95
11 changed files with 38 additions and 38 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ func newVarTerm(tk *Token) *term {
// -------- eval func
func evalVar(ctx exprContext, self *term) (v any, err error) {
var exists bool
if v, exists = ctx.GetValue(self.tk.source); !exists {
if v, exists = ctx.GetVar(self.tk.source); !exists {
err = fmt.Errorf("undefined variable %q", self.tk.source)
}
return