Functions returns a shallow copy of the Functions, keyed by function name, that have been configured in the environment.
()
| 622 | |
| 623 | // Functions returns a shallow copy of the Functions, keyed by function name, that have been configured in the environment. |
| 624 | func (e *Env) Functions() map[string]*decls.FunctionDecl { |
| 625 | shallowCopy := make(map[string]*decls.FunctionDecl, len(e.functions)) |
| 626 | for nm, fn := range e.functions { |
| 627 | shallowCopy[nm] = fn |
| 628 | } |
| 629 | return shallowCopy |
| 630 | } |
| 631 | |
| 632 | // Variables returns a shallow copy of the variables associated with the environment. |
| 633 | func (e *Env) Variables() []*decls.VariableDecl { |
no outgoing calls