AddIdent adds the ident Decl in the current scope. Note: If the name collides with an existing identifier in the scope, the Decl is overwritten.
(decl *decls.VariableDecl)
| 67 | // AddIdent adds the ident Decl in the current scope. |
| 68 | // Note: If the name collides with an existing identifier in the scope, the Decl is overwritten. |
| 69 | func (s *Scopes) AddIdent(decl *decls.VariableDecl) { |
| 70 | s.scopes.idents[decl.Name()] = decl |
| 71 | } |
| 72 | |
| 73 | // FindIdentInScope finds the first ident Decl with a matching name in the current Scopes value, or |
| 74 | // nil if one does not exist. |