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

Method IsLocalVariable

interpreter/frame.go:200–211  ·  view source on GitHub ↗

IsLocalVariable reports whether the variable name is locally bound in the frame.

(name string)

Source from the content-addressed store, hash-verified

198
199// IsLocalVariable reports whether the variable name is locally bound in the frame.
200func (f *ExecutionFrame) IsLocalVariable(name string) bool {
201 if holder, ok := f.Activation.(localVariableHolder); ok {
202 if holder.IsLocalVariable(name) {
203 return true
204 }
205 }
206 // Search parent scopes
207 if f.parent != nil {
208 return f.parent.IsLocalVariable(name)
209 }
210 return false
211}
212
213// CheckInterrupt returns whether the evaluation has been interrupted.
214func (f *ExecutionFrame) CheckInterrupt() bool {

Callers

nothing calls this directly

Calls 1

IsLocalVariableMethod · 0.65

Tested by

no test coverage detected