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

Method FindClass

resolver/annotated_tree.go:142–148  ·  view source on GitHub ↗
(scope symbol.Scope, name string)

Source from the content-addressed store, hash-verified

140 return ret
141}
142func (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 中逐级查找变量
151func (a *AnnotatedTree) FindVariable(scope symbol.Scope, name string) *symbol.Variable {

Callers 3

ExitFunctionCallMethod · 0.80
EnterClassDeclarationMethod · 0.80

Calls 2

GetClassMethod · 0.65
GetEncloseScopeMethod · 0.65

Tested by

no test coverage detected