MCPcopy Create free account
hub / github.com/crossoverJie/gscript / FindFunction

Method FindFunction

resolver/annotated_tree.go:169–175  ·  view source on GitHub ↗

FindFunction 根据方法名称+方法参数查询方法

(scope symbol.Scope, name string, paramTypes []symbol.Type)

Source from the content-addressed store, hash-verified

167
168// FindFunction 根据方法名称+方法参数查询方法
169func (a *AnnotatedTree) FindFunction(scope symbol.Scope, name string, paramTypes []symbol.Type) *symbol.Func {
170 var ret = scope.GetFunction(name, paramTypes)
171 if ret == nil && scope.GetEncloseScope() != nil {
172 ret = a.FindFunction(scope.GetEncloseScope(), name, paramTypes)
173 }
174 return ret
175}
176
177// FindFunctionWithName 只通过函数名称查询
178// 先查询 class 的method,再查询 function

Callers 3

ExitBlockStmsMethod · 0.80
ExitFunctionCallMethod · 0.80

Calls 2

GetFunctionMethod · 0.65
GetEncloseScopeMethod · 0.65

Tested by

no test coverage detected