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)
| 71 | // AddIdent adds the ident Decl in the current scope. |
| 72 | // Note: If the name collides with an existing identifier in the scope, the Decl is overwritten. |
| 73 | func (s *Scopes) AddIdent(decl *decls.VariableDecl) { |
| 74 | s.scopes.idents[decl.Name()] = decl |
| 75 | } |
| 76 | |
| 77 | // FindIdent finds the first ident Decl with a matching name in Scopes, or nil if one cannot be |
| 78 | // found. |