FindFunctionActivation returns the activation which supplies the late-bound function implementations for a hierarchy, or nil when the hierarchy supplies none. Late-bound functions are bound for the duration of an evaluation rather than for a lexical scope, so a hierarchy may contain at most one act
(vars Activation)
| 342 | // caller-supplied activations. Scopes introduced during evaluation, such as those of a |
| 343 | // comprehension, report the enclosing frame as their parent rather than the enclosing activation. |
| 344 | func FindFunctionActivation(vars Activation) (FunctionActivation, error) { |
| 345 | return findFunctionActivation(vars, nil) |
| 346 | } |
| 347 | |
| 348 | // findFunctionActivation searches a hierarchy for the activation which supplies late-bound |
| 349 | // functions, carrying the match found so far so that a second match can be reported as an error. |