function definition and usage rationalized

This commit is contained in:
2024-05-24 06:28:48 +02:00
parent d545a35acf
commit e5f63c3d9d
16 changed files with 342 additions and 251 deletions
+2 -2
View File
@@ -38,9 +38,9 @@ func EvalStringV(source string, args []Arg) (result any, err error) {
for _, arg := range args {
if isFunc(arg.Value) {
if f, ok := arg.Value.(FuncTemplate); ok {
functor := newSimpleFunctor(f)
functor := newGolangFunctor(f)
// ctx.RegisterFunc(arg.Name, functor, 0, -1)
ctx.RegisterFunc2(arg.Name, functor, typeAny, []ExprFuncParam{
ctx.RegisterFunc(arg.Name, functor, typeAny, []ExprFuncParam{
newFuncParamFlagDef(paramValue, pfOptional|pfRepeat, 0),
})
} else {