ast

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: BSD-3-Clause Imports: 10 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

func Concat(items ...interface{}) ([]interface{}, error)

func Key

func Key(indexer interface{}) (interface{}, error)

Types

type Expr

type Expr interface {
	Init(resolver resolve.CompositeResolver, root bool) error //todo can use root to multi-thread eval of root node

	Eval(scope data.Scope) (interface{}, error)
}

func AppendToExprList

func AppendToExprList(list, x interface{}) ([]Expr, error)

func NewArithExpr

func NewArithExpr(left, operand, right interface{}) (Expr, error)

func NewBoolExpr

func NewBoolExpr(left, operand, right interface{}) (Expr, error)

func NewCmpExpr

func NewCmpExpr(left, operand, right interface{}) (Expr, error)

func NewExprList

func NewExprList(x interface{}) ([]Expr, error)

func NewFuncExpr

func NewFuncExpr(name interface{}, args interface{}) (Expr, error)

func NewLiteral

func NewLiteral(litType string, lit interface{}) (Expr, error)

func NewRefExpr

func NewRefExpr(refNode ...interface{}) (Expr, error)

func NewTernaryArgument

func NewTernaryArgument(first interface{}) (Expr, error)

func NewTernaryExpr

func NewTernaryExpr(ifNode, thenNode, elseNode interface{}) (Expr, error)

func NewUnaryExpr

func NewUnaryExpr(operand, tok interface{}) (Expr, error)

type GetValueExpr

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

func (*GetValueExpr) Eval

func (d *GetValueExpr) Eval(scope data.Scope) (interface{}, error)

func (*GetValueExpr) Init

func (d *GetValueExpr) Init(resolver resolve.CompositeResolver, root bool) error

type IsDefinedExpr

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

func (*IsDefinedExpr) Eval

func (d *IsDefinedExpr) Eval(scope data.Scope) (interface{}, error)

func (*IsDefinedExpr) Init

func (d *IsDefinedExpr) Init(resolver resolve.CompositeResolver, root bool) error

Jump to

Keyboard shortcuts

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