LookupTypeDef returns the named type last bound to name by LookupTypeNamed. It returns nil if name is unbound.
(name string)
| 290 | // LookupTypeDef returns the named type last bound to name by LookupTypeNamed. |
| 291 | // It returns nil if name is unbound. |
| 292 | func (c *Context) LookupTypeDef(name string) *TypeNamed { |
| 293 | c.mu.Lock() |
| 294 | defer c.mu.Unlock() |
| 295 | if c.typedefs == nil { |
| 296 | return nil |
| 297 | } |
| 298 | return c.typedefs[name] |
| 299 | } |
| 300 | |
| 301 | // LookupTypeNamed returns the named type for name and inner. It also binds |
| 302 | // name to that named type. LookupTypeNamed returns an error if name is not a |
no outgoing calls