SetFunction adds the function Decl to the current scope. Note: Any previous entry for a function in the current scope with the same name is overwritten.
(fn *decls.FunctionDecl)
| 110 | // SetFunction adds the function Decl to the current scope. |
| 111 | // Note: Any previous entry for a function in the current scope with the same name is overwritten. |
| 112 | func (s *Scopes) SetFunction(fn *decls.FunctionDecl) { |
| 113 | s.scopes.functions[fn.Name()] = fn |
| 114 | } |
| 115 | |
| 116 | // FindFunction finds the first function Decl with a matching name in Scopes. |
| 117 | // The search is performed from innermost to outermost. |