MCPcopy Create free account
hub / github.com/cel-expr/cel-go / FindGlobalIdent

Method FindGlobalIdent

checker/scopes.go:114–120  ·  view source on GitHub ↗

FindGlobalIdent finds an identifier in the global scope, ignoring all local scopes.

(name string)

Source from the content-addressed store, hash-verified

112
113// FindGlobalIdent finds an identifier in the global scope, ignoring all local scopes.
114func (s *Scopes) FindGlobalIdent(name string) *decls.VariableDecl {
115 scope := s
116 for scope.parent != nil {
117 scope = scope.parent
118 }
119 return scope.FindIdentInScope(name)
120}
121
122// SetFunction adds the function Decl to the current scope.
123// Note: Any previous entry for a function in the current scope with the same name is overwritten.

Callers 1

lookupGlobalIdentMethod · 0.80

Calls 1

FindIdentInScopeMethod · 0.80

Tested by

no test coverage detected