exec

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(a, b interface{}) interface{}

func GetBuiltinProto

func GetBuiltinProto(typ reflect.Type, prop interface{}) interface{}

func GetElem

func GetElem(obj, prop interface{}) interface{}

func GetProp

func GetProp(obj, prop interface{}) interface{}

func IsNativeFn

func IsNativeFn(o interface{}) bool

func ToBool

func ToBool(v interface{}) bool

func ToNum

func ToNum(v interface{}) float64

func ToStr

func ToStr(v interface{}) string

Types

type Args

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

func NewArgs

func NewArgs(args []interface{}) *Args

func (*Args) Get

func (a *Args) Get(i int) interface{}

type BuiltinFn

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

func NewBuiltinFn

func NewBuiltinFn(this interface{}, fn NativeFn) *BuiltinFn

func (*BuiltinFn) Call

func (f *BuiltinFn) Call(args *Args) interface{}

type ExprEvaluator

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

func NewExprEvaluator

func NewExprEvaluator(node parser.Node, p *parser.Parser) *ExprEvaluator

func (*ExprEvaluator) Exec

func (ee *ExprEvaluator) Exec(vars map[string]interface{}) *ExprEvaluator

func (*ExprEvaluator) GetResult

func (ee *ExprEvaluator) GetResult() (interface{}, error)

func (*ExprEvaluator) Release

func (ee *ExprEvaluator) Release()

type NativeFn

type NativeFn = func(this interface{}, args *Args) interface{}

Jump to

Keyboard shortcuts

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