eval

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

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 BeginEval

func BeginEval(program ast.Node, env *object.Environment, lexer *lexer.Lexer) object.Object

BeginEval (program, env, lexer) object.Object REPL and testing modules call this function to init the global lexer pointer for error location NB. Eval(node, env) is recursive

func Eval

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

Eval evaluates the node and returns an object

func EvalModule

func EvalModule(tok token.Token, 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