FindFunction 根据方法名称+方法参数查询方法
(scope symbol.Scope, name string, paramTypes []symbol.Type)
| 167 | |
| 168 | // FindFunction 根据方法名称+方法参数查询方法 |
| 169 | func (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 |
no test coverage detected