IsLocalVariable reports whether the variable name is locally bound in the frame.
(name string)
| 336 | |
| 337 | // IsLocalVariable reports whether the variable name is locally bound in the frame. |
| 338 | func (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. |
| 352 | func (f *ExecutionFrame) CheckInterrupt() bool { |
nothing calls this directly
no test coverage detected