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