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

Method IsLocalVariable

interpreter/frame.go:338–349  ·  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

336
337// IsLocalVariable reports whether the variable name is locally bound in the frame.
338func (f *ExecutionFrame) IsLocalVariable(name string) bool {
339 if holder, ok := f.scope.(localVariableHolder); ok {
340 if holder.IsLocalVariable(name) {
341 return true
342 }
343 }
344 // Search parent scopes
345 if f.parent != nil {
346 return f.parent.IsLocalVariable(name)
347 }
348 return false
349}
350
351// CheckInterrupt returns whether the evaluation has been interrupted.
352func (f *ExecutionFrame) CheckInterrupt() bool {

Callers

nothing calls this directly

Calls 1

IsLocalVariableMethod · 0.65

Tested by

no test coverage detected