Changed SetValue() as SetVar() and GetValue() as GetVar()
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user