evaluator

package
v0.0.0-...-ce6e6e9 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NULL  = &object.Null{}
	TRUE  = &object.Boolean{Value: true}
	FALSE = &object.Boolean{Value: false}
)

Functions

func ApplyFunction

func ApplyFunction(ctx context.Context, fn object.Object, args []object.Object, keywords map[string]object.Object, env *object.Environment) object.Object

ApplyFunction calls a function object with arguments and keyword arguments. This is exported for use by other packages that need to call script functions directly.

func Eval

func Eval(node ast.Node, env *object.Environment) object.Object

Eval executes without context (backwards compatible)

func EvalWithContext

func EvalWithContext(ctx context.Context, node ast.Node, env *object.Environment) object.Object

EvalWithContext executes with context for timeout/cancellation

func GetEnvFromContext

func GetEnvFromContext(ctx context.Context) *object.Environment

GetEnvFromContext retrieves environment from context for external functions

func GetImportBuiltin

func GetImportBuiltin() *object.Builtin

func SetEnvInContext

func SetEnvInContext(ctx context.Context, env *object.Environment) context.Context

SetEnvInContext stores environment in context for builtin functions

Types

This section is empty.

Jump to

Keyboard shortcuts

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