environment

package
v4.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: MIT Imports: 4 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Parent    *Environment
	Variables map[string]*shared.RuntimeValue
	Constants map[string]struct{}
	Global    bool
	Mutex     sync.RWMutex
}

func DeepCopy

func DeepCopy(env *Environment) *Environment

DeepCopy creates a deep copy of the environment

func NewEnvironment

func NewEnvironment(fork *Environment) *Environment

func (*Environment) AssignVar

func (*Environment) DeclareVar

func (e *Environment) DeclareVar(name string, value shared.RuntimeValue, constant bool) (*shared.RuntimeValue, *errors.RuntimeError)

func (*Environment) LookupVar

func (e *Environment) LookupVar(name string) (*shared.RuntimeValue, *errors.RuntimeError)

func (*Environment) Resolve

func (e *Environment) Resolve(varname string) (*Environment, *errors.RuntimeError)

Jump to

Keyboard shortcuts

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