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

Method IsLocalVariable

interpreter/interpretable.go:2097–2110  ·  view source on GitHub ↗

IsLocalVariable reports whether the variable name is locally bound by the folder scope.

(name string)

Source from the content-addressed store, hash-verified

2095
2096// IsLocalVariable reports whether the variable name is locally bound by the folder scope.
2097func (f *folder) IsLocalVariable(name string) bool {
2098 if name == f.accuVar {
2099 return true
2100 }
2101 if !f.computeResult && (name == f.iterVar || name == f.iterVar2) {
2102 return true
2103 }
2104 if varHolder, ok := f.Parent().(localVariableHolder); ok {
2105 if varHolder.IsLocalVariable(name) {
2106 return true
2107 }
2108 }
2109 return false
2110}
2111
2112// UnknownAttributePatterns implements the PartialActivation interface returning the unknown patterns
2113// if they were provided to the input activation, or an empty set if the proxied activation is not partial.

Callers

nothing calls this directly

Calls 2

ParentMethod · 0.95
IsLocalVariableMethod · 0.65

Tested by

no test coverage detected