evaluator

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NONE  = &object.None{Value: "None"}
	TRUE  = &object.Boolean{Value: true}
	FALSE = &object.Boolean{Value: false}

	MAX_CALL_DEPTH              = 1000
	CurrentContext *CallContext = nil
)
View Source
var LineReader *liner.State

Functions

func CleanupCallStack added in v0.1.6

func CleanupCallStack(fn *object.Function)

CleanupCallStack removes entries from call stack for specific function

func CleanupGlobalState added in v0.1.6

func CleanupGlobalState()

CleanupGlobalState clears all global state maps to prevent memory leaks

func CleanupRecursionDepth added in v0.1.6

func CleanupRecursionDepth(node *ast.BlockStatement)

CleanupRecursionDepth removes recursion tracking for specific AST node

func Eval

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

Main evaluation function

func EvalWithDebug added in v0.1.6

func EvalWithDebug(node ast.Node, env *object.Environment, ctx *CallContext, debugConfig *debug.Config) object.Object

EvalWithDebug evaluates an AST node with debug output

func LoadMuninStdlib

func LoadMuninStdlib(env *object.Environment) error

Types

type CallContext added in v0.1.6

type CallContext struct {
	FunctionName string
	Node         ast.Node
	Parent       *CallContext
	// contains filtered or unexported fields
}

CallContext tracks function call state for better error reporting

Jump to

Keyboard shortcuts

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