Documentation ¶
Index ¶
- Variables
- func ResolveFile(idx *Index, f *ast.File, p *build.Instance, allFields map[string]ast.Node, ...) errors.Error
- func ResolveFiles(idx *Index, p *build.Instance, isBuiltin func(s string) bool) (errs errors.Error)
- type Index
- func (x *Index) AddInst(path string, key, p interface{})
- func (x *Index) GetImportFromNode(key interface{}) interface{}
- func (x *Index) GetImportFromPath(id string) interface{}
- func (x *Index) HasLabel(s string) (ok bool)
- func (x *Index) IndexToString(i int64) string
- func (x *Index) Label(s string, isIdent bool) adt.Feature
- func (idx *Index) LabelStr(l adt.Feature) string
- func (x *Index) LoadType(t reflect.Type) (v interface{}, ok bool)
- func (x *Index) NodeLabel(n ast.Node) (f adt.Feature, ok bool)
- func (x *Index) StoreType(t reflect.Type, v interface{})
- func (x *Index) StrLabel(str string) adt.Feature
- func (x *Index) StringToIndex(s string) int64
- type Runtime
- func (x *Runtime) Build(b *build.Instance) (v *adt.Vertex, errs errors.Error)
- func (x *Runtime) IndexToString(i int64) string
- func (x *Runtime) LoadImport(importPath string) (*adt.Vertex, errors.Error)
- func (x *Runtime) LoadType(t reflect.Type) (src ast.Expr, expr adt.Expr, ok bool)
- func (x *Runtime) StoreType(t reflect.Type, src ast.Expr, expr adt.Expr)
- func (x *Runtime) StringToIndex(s string) int64
Constants ¶
This section is empty.
Variables ¶
SharedIndex is used for indexing builtins and any other labels common to all instances.
Functions ¶
func ResolveFile ¶
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index maps conversions from label names to internal codes.
All instances belonging to the same package should share this Index.
INDEX IS A TRANSITIONAL TYPE TO BRIDGE THE OLD AND NEW IMPLEMENTATIONS. USE RUNTIME.
func (*Index) GetImportFromNode ¶
func (x *Index) GetImportFromNode(key interface{}) interface{}
func (*Index) GetImportFromPath ¶
func (*Index) IndexToString ¶
func (*Index) StringToIndex ¶
type Runtime ¶
type Runtime struct { // Data holds the legacy index strut. It is for transitional purposes only. Data interface{} // contains filtered or unexported fields }
A Runtime maintains data structures for indexing and resuse for evaluation.
func NewWithIndex ¶
func (*Runtime) IndexToString ¶
func (*Runtime) LoadImport ¶
func (*Runtime) StringToIndex ¶
Click to show internal directories.
Click to hide internal directories.