newIdent declares a new Go variable with the given name and type and returns an *ast.Ident referring to that object.
(name string, t types.Type)
| 329 | // newIdent declares a new Go variable with the given name and type and returns |
| 330 | // an *ast.Ident referring to that object. |
| 331 | func (fc *funcContext) newIdent(name string, t types.Type) *ast.Ident { |
| 332 | obj := types.NewVar(0, fc.pkgCtx.Pkg, name, t) |
| 333 | fc.objectNames[obj] = name |
| 334 | return fc.newIdentFor(obj) |
| 335 | } |
| 336 | |
| 337 | // newIdentFor creates a new *ast.Ident referring to the given Go object. |
| 338 | func (fc *funcContext) newIdentFor(obj types.Object) *ast.Ident { |
no test coverage detected