The function parameter model has been modified to support the passing of named parameters
This commit is contained in:
+14
-1
@@ -55,7 +55,20 @@ func GetLocalFuncInfo(ctx ExprContext, name string) (item ExprFunc, exists bool)
|
||||
}
|
||||
return
|
||||
}
|
||||
func GetFuncInfo(ctx ExprContext, name string) (item ExprFunc, exists bool, ownerCtx ExprContext) {
|
||||
|
||||
func GetFuncInfo(ctx ExprContext, name string) (item ExprFunc, exists bool) {
|
||||
// if len(name) > 0 {
|
||||
// if item, exists = GetLocalFuncInfo(ctx, name); exists {
|
||||
// ownerCtx = ctx
|
||||
// } else if item, exists = globalCtx.GetFuncInfo(name); exists {
|
||||
// ownerCtx = globalCtx
|
||||
// }
|
||||
// }
|
||||
item, exists, _ = GetFuncInfoAndOwner(ctx, name)
|
||||
return
|
||||
}
|
||||
|
||||
func GetFuncInfoAndOwner(ctx ExprContext, name string) (item ExprFunc, exists bool, ownerCtx ExprContext) {
|
||||
if len(name) > 0 {
|
||||
if item, exists = GetLocalFuncInfo(ctx, name); exists {
|
||||
ownerCtx = ctx
|
||||
|
||||
Reference in New Issue
Block a user