Documentation ¶
Index ¶
- type Index
- func (i *Index) AddDefinition(d def.Definition)
- func (i *Index) AddImport(parentPath string, alias, depPath string)
- func (i *Index) All() map[string]def.Definition
- func (i *Index) DefinitionOf(packagePath string, n ast.Node) (def.Definition, error)
- func (i *Index) DefinitionsByPath(path string) (defs []def.Definition)
- func (i *Index) Get(id string) def.Definition
- func (i *Index) GetImports(parentPath string) map[string]string
- func (i *Index) Inits() (inits []def.Definition)
- func (i *Index) Link(alias string, d def.Definition)
- func (i *Index) Mains() (mains []def.Definition)
- func (i *Index) Paths() (paths []string)
- func (i *Index) Runtime(names ...string) (runtimes []def.Definition, err error)
- func (i *Index) SetVDOMFile(def def.Definition)
- func (i *Index) SetVDOMPragma(pragma string)
- func (i *Index) TypeOf(packagePath string, n ast.Node) (types.Type, error)
- func (i *Index) VDOMFile() (def.Definition, error)
- func (i *Index) VDOMPragma() (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index type
func (*Index) AddDefinition ¶
func (i *Index) AddDefinition(d def.Definition)
AddDefinition adds a definition to the index
func (*Index) All ¶
func (i *Index) All() map[string]def.Definition
All gets all definitions from the index TODO: remove
func (*Index) DefinitionOf ¶
DefinitionOf fn Will return nil when ident is: - package name - basic type - local variable that points to a basic type - function parameters & results TODO: memoize
func (*Index) DefinitionsByPath ¶
func (i *Index) DefinitionsByPath(path string) (defs []def.Definition)
DefinitionsByPath returns a unique, deterministic number of definitions given a particular path
func (*Index) Get ¶
func (i *Index) Get(id string) def.Definition
Get all definitions from the index
func (*Index) GetImports ¶
GetImports fn
func (*Index) Inits ¶
func (i *Index) Inits() (inits []def.Definition)
Inits gets all the main functions
func (*Index) Link ¶
func (i *Index) Link(alias string, d def.Definition)
Link is like a symlink to a definition
func (*Index) Mains ¶
func (i *Index) Mains() (mains []def.Definition)
Mains gets all the main functions
func (*Index) Runtime ¶
func (i *Index) Runtime(names ...string) (runtimes []def.Definition, err error)
Runtime gets a definition from the runtime
func (*Index) SetVDOMFile ¶
func (i *Index) SetVDOMFile(def def.Definition)
SetVDOMFile sets the vdom file
func (*Index) SetVDOMPragma ¶
SetVDOMPragma sets up JSX
func (*Index) VDOMFile ¶
func (i *Index) VDOMFile() (def.Definition, error)
VDOMFile gets the vdom file
func (*Index) VDOMPragma ¶
VDOMPragma gets our jsx settings if we've specified them