ast

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Concat

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

func Indexer added in v0.0.2

func Indexer(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)

Jump to

Keyboard shortcuts

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