Documentation
¶
Index ¶
- Variables
- func CleanupCallStack(fn *object.Function)
- func CleanupGlobalState()
- func CleanupRecursionDepth(node *ast.BlockStatement)
- func Eval(node ast.Node, env *object.Environment, ctx *CallContext) object.Object
- func EvalWithDebug(node ast.Node, env *object.Environment, ctx *CallContext, ...) object.Object
- func LoadModules(env *object.Environment)
- func LoadMuninStdlib(env *object.Environment) error
- func SetStdlibEnv(env *object.Environment)
- type CallContext
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
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 LoadModules ¶ added in v0.1.7
func LoadModules(env *object.Environment)
func LoadMuninStdlib ¶
func LoadMuninStdlib(env *object.Environment) error
func SetStdlibEnv ¶ added in v0.1.7
func SetStdlibEnv(env *object.Environment)
SetStdlibEnv sets the global reference to the standard library environment
Types ¶
type CallContext ¶ added in v0.1.6
type CallContext struct {
FunctionName string
Node ast.Node
Parent *CallContext
IsDirectExecution bool // True when file is run directly, false when imported
// contains filtered or unexported fields
}
CallContext tracks function call state for better error reporting
Click to show internal directories.
Click to hide internal directories.