Rework/simplify expr.Vars handling

This commit is contained in:
Denis Arh
2021-04-01 21:10:51 +02:00
parent fc331cc388
commit fdf916b7f9
30 changed files with 436 additions and 324 deletions
+2 -2
View File
@@ -66,11 +66,11 @@ func (p *gvalParser) ParseEvaluators(ee ...Evaluator) error {
}
func (e *gvalEval) Eval(ctx context.Context, scope *Vars) (interface{}, error) {
return e.evaluable(ctx, scope.Dict())
return e.evaluable(ctx, scope)
}
func (e *gvalEval) Test(ctx context.Context, scope *Vars) (bool, error) {
r, err := e.evaluable(ctx, scope.Dict())
r, err := e.evaluable(ctx, scope)
if err != nil {
return false, err
}