(scope symbol.Scope, name string)
| 140 | return ret |
| 141 | } |
| 142 | func (a *AnnotatedTree) FindClass(scope symbol.Scope, name string) *symbol.Class { |
| 143 | class := scope.GetClass(name) |
| 144 | if class == nil && scope.GetEncloseScope() != nil { |
| 145 | class = a.FindClass(scope.GetEncloseScope(), name) |
| 146 | } |
| 147 | return class |
| 148 | } |
| 149 | |
| 150 | // FindVariable 根据变量名称在 scope 中逐级查找变量 |
| 151 | func (a *AnnotatedTree) FindVariable(scope symbol.Scope, name string) *symbol.Variable { |
no test coverage detected