runtime

package
v0.3.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SharedRuntime = &Runtime{index: sharedIndex}

Functions

func RegisterBuiltin

func RegisterBuiltin(importPath string, f PackageFunc)

Types

type PackageFunc

type PackageFunc func(ctx adt.Runtime) (*adt.Vertex, errors.Error)

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. The builtins registered with RegisterBuiltin are available for

func (*Runtime) AddInst

func (r *Runtime) AddInst(path string, key *adt.Vertex, p *build.Instance)

func (*Runtime) Build

func (x *Runtime) Build(b *build.Instance) (v *adt.Vertex, errs errors.Error)

Build builds b and all its transitive dependencies, insofar they have not been build yet.

func (*Runtime) GetInstanceFromNode

func (r *Runtime) GetInstanceFromNode(key *adt.Vertex) *build.Instance

func (*Runtime) GetNodeFromInstance

func (r *Runtime) GetNodeFromInstance(key *build.Instance) *adt.Vertex

func (*Runtime) IndexToString

func (r *Runtime) IndexToString(i int64) string

func (*Runtime) IsBuiltinPackage

func (x *Runtime) IsBuiltinPackage(path string) bool

func (*Runtime) Label

func (r *Runtime) Label(s string, isIdent bool) adt.Feature

func (*Runtime) LabelStr

func (r *Runtime) LabelStr(l adt.Feature) string

func (*Runtime) LoadImport

func (r *Runtime) LoadImport(importPath string) (*adt.Vertex, errors.Error)

func (*Runtime) LoadType

func (x *Runtime) LoadType(t reflect.Type) (src ast.Expr, expr adt.Expr, ok bool)

func (*Runtime) ResolveFiles

func (r *Runtime) ResolveFiles(p *build.Instance) (errs errors.Error)

func (*Runtime) StoreType

func (x *Runtime) StoreType(t reflect.Type, src ast.Expr, expr adt.Expr)

func (*Runtime) StrLabel

func (r *Runtime) StrLabel(str string) adt.Feature

func (*Runtime) StringToIndex

func (r *Runtime) StringToIndex(s string) int64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL