go: cuelang.org/go/internal/core/compile Index | Files

package compile

import "cuelang.org/go/internal/core/compile"


Package Files

builtin.go compile.go errors.go label.go predeclared.go

func Expr Uses

func Expr(cfg *Config, r adt.Runtime, x ast.Expr) (adt.Conjunct, errors.Error)

func Files Uses

func Files(cfg *Config, r adt.Runtime, files ...*ast.File) (*adt.Vertex, errors.Error)

Files compiles the given files as a single instance. It disregards the package names and it is the responsibility of the user to verify that the packages names are consistent.

Files may return a completed parse even if it has errors.

func LookupRange Uses

func LookupRange(name string) adt.Expr

LookupRange returns a CUE expressions for the given predeclared identifier representing a range, such as uint8, int128, and float64.

type Config Uses

type Config struct {
    // Scope specifies a node in which to look up unresolved references. This
    // is useful for evaluating expressions within an already evaluated
    // configuration.
    // TODO
    Scope *adt.Vertex

    // Imports allows unresolved identifiers to resolve to imports.
    // Under normal circumstances, identifiers bind to import specifications,
    // which get resolved to an ImportReference. Use this option to automaically
    // resolve identifiers to imports.
    Imports func(x *ast.Ident) (pkgPath string)

Config configures a compilation.

Package compile imports 12 packages (graph) and is imported by 6 packages. Updated 2020-09-28. Refresh now. Tools for package owners.