expr/context.go

19 lines
407 B
Go
Raw Normal View History

2024-03-26 08:45:18 +01:00
// Copyright (c) 2024 Celestino Amoroso (celestino.amoroso@gmail.com).
// All rights reserved.
2024-03-26 07:00:53 +01:00
// context.go
package expr
type exprFunc interface {
Name() string
MinArgs() int
MaxArgs() int
}
type exprContext interface {
GetValue(varName string) (value any, exists bool)
SetValue(varName string, value any)
GetFuncInfo(name string) exprFunc
Call(name string, args []any) (result any, err error)
}