eval

package
v2.0.8 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package eval implements the evaluator -- a tree-walker implemtnation that recursively walks the parsed AST (abstract syntax tree) and evaluates the nodes according to their semantic meaning

Index

Constants

This section is empty.

Variables

View Source
var (
	// TRUE is a cached Boolean object holding the `true` value
	TRUE = object.Boolean{Value: true}

	// FALSE is a cached Boolean object holding the `false` value
	FALSE = object.Boolean{Value: false}

	// NULL is a cached Null object
	NULL = object.Null{}
)

Functions

func Eval

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

Eval evaluates the node and returns an object

func EvalModule

func EvalModule(ctx context.Context, name string) object.Object

EvalModule evaluates the named module and returns a object.Module object

Types

This section is empty.

Jump to

Keyboard shortcuts

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