diff --git a/bind-expr-functions.go b/bind-expr-functions.go index f39d5fc..02427d3 100644 --- a/bind-expr-functions.go +++ b/bind-expr-functions.go @@ -29,6 +29,10 @@ func newExprFunctor(e Expr, params []ExprFuncParam, ctx ExprContext) *exprFuncto return &exprFunctor{expr: e, params: params, defCtx: defCtx} } +func (functor *exprFunctor) TypeName() string { + return "ExprFunctor" +} + func (functor *exprFunctor) GetDefinitionContext() ExprContext { return functor.defCtx } diff --git a/bind-go-functions.go b/bind-go-functions.go index d525ef6..c120f5f 100644 --- a/bind-go-functions.go +++ b/bind-go-functions.go @@ -14,6 +14,10 @@ func NewGolangFunctor(f FuncTemplate) *golangFunctor { return &golangFunctor{f: f} } +func (functor *golangFunctor) TypeName() string { + return "GoFunctor" +} + func (functor *golangFunctor) Invoke(ctx ExprContext, name string, args []any) (result any, err error) { return functor.f(ctx, name, args) } diff --git a/expr-function.go b/expr-function.go index 9e33051..d8520ae 100644 --- a/expr-function.go +++ b/expr-function.go @@ -6,6 +6,7 @@ package expr // ---- Functor interface type Functor interface { + Typer Invoke(ctx ExprContext, name string, args []any) (result any, err error) SetFunc(info ExprFunc) GetFunc() ExprFunc