semantic

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 20 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 DotExprToFieldPath

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

Types

type Binder

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

func NewBinder

func NewBinder() *Binder

func (*Binder) Define

func (b *Binder) Define(name string, ref dag.Expr)

type Scope

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

func NewScope

func NewScope() *Scope

func (*Scope) DefineAs added in v1.0.0

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

func (*Scope) DefineConst added in v1.0.0

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

func (*Scope) DefineFunc added in v1.4.0

func (s *Scope) DefineFunc(f *dag.Func) error

func (*Scope) DefineVar added in v1.0.0

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

func (*Scope) Enter

func (s *Scope) Enter()

func (*Scope) Exit

func (s *Scope) Exit()

func (*Scope) Lookup

func (s *Scope) Lookup(name string) dag.Expr

Jump to

Keyboard shortcuts

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