semantic

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Analyze

func Analyze(ctx context.Context, seq ast.Seq, source *data.Source, head *lakeparse.Commitish) (dag.Seq, error)

Analyze performs a semantic analysis of the AST, translating it from AST to DAG form, resolving syntax ambiguities, and performing constant propagation. After semantic analysis, the DAG is ready for either optimization or compilation.

func AnalyzeAddSource added in v1.11.0

func AnalyzeAddSource(ctx context.Context, seq ast.Seq, source *data.Source, head *lakeparse.Commitish) (dag.Seq, error)

AnalyzeAddSource is the same as Analyze but it adds a default source if the DAG does not have one.

func DotExprToFieldPath

func DotExprToFieldPath(e ast.Expr) *dag.This

func HasSource added in v1.11.0

func HasSource(seq dag.Seq) bool

func StartsWithYield added in v1.11.0

func StartsWithYield(seq dag.Seq) bool

Types

type Scope

type Scope struct {
	// contains filtered or unexported fields
}

func NewScope

func NewScope(parent *Scope) *Scope

func (*Scope) DefineAs added in v1.0.0

func (s *Scope) DefineAs(name string, e any) error

func (*Scope) DefineConst added in v1.0.0

func (s *Scope) DefineConst(zctx *zed.Context, name string, def dag.Expr) error

func (*Scope) DefineVar added in v1.0.0

func (s *Scope) DefineVar(name string) error

func (*Scope) LookupExpr added in v1.9.0

func (s *Scope) LookupExpr(name string) (dag.Expr, error)

Jump to

Keyboard shortcuts

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