package runtime
import "cuelang.org/go/internal/core/runtime"
Index ¶
- Variables
- func ResolveFile( idx *Index, f *ast.File, p *build.Instance, allFields map[string]ast.Node, isBuiltin func(s string) bool, ) errors.Error
- func ResolveFiles( idx *Index, p *build.Instance, isBuiltin func(s string) bool, ) (errs errors.Error)
- type Index
- func NewIndex(parent *Index) *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 New() *Runtime
- func NewWithIndex(x *Index) *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
Variables ¶
var
= newSharedIndex()SharedIndex is used for indexing builtins and any other labels common to all instances.
var
= newSharedIndex()var Runtime{index: SharedIndexNew}= &
Functions ¶
func ResolveFile ¶
func ResolveFile( idx *Index, f *ast.File, p *build.Instance, allFields map[string]ast.Node, isBuiltin func(s string) bool, ) errors.Error
func ResolveFiles ¶
func ResolveFiles( idx *Index, p *build.Instance, isBuiltin func(s string) bool, ) (errs errors.Error)
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 NewIndex ¶
NewIndex creates a new index.
func (*Index) AddInst ¶
func (*Index) GetImportFromNode ¶
func (x *Index) GetImportFromNode(key interface{}) interface{}
func (*Index) GetImportFromPath ¶
func (*Index) HasLabel ¶
func (*Index) IndexToString ¶
func (*Index) Label ¶
func (*Index) LabelStr ¶
func (*Index) LoadType ¶
func (*Index) NodeLabel ¶
func (*Index) StoreType ¶
func (*Index) StrLabel ¶
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 New ¶
func New() *Runtime
New creates a new Runtime.
func NewWithIndex ¶
func (*Runtime) Build ¶
func (*Runtime) IndexToString ¶
func (*Runtime) LoadImport ¶
func (*Runtime) LoadType ¶
func (*Runtime) StoreType ¶
func (*Runtime) StringToIndex ¶
Source Files ¶
errors.go index.go resolve.go runtime.go
- Version
- v0.3.0-alpha2
- Published
- Sep 16, 2020
- Platform
- darwin/amd64
- Imports
- 13 packages
- Last checked
- 7 hours ago –
Tools for package owners.