Documentation
¶
Index ¶
- type Environment
- func (e *Environment) AssignVar(name string, value shared.RuntimeValue) (*shared.RuntimeValue, *errors.RuntimeError)
- func (e *Environment) DeclareVar(name string, value shared.RuntimeValue, constant bool) (*shared.RuntimeValue, *errors.RuntimeError)
- func (e *Environment) LookupVar(name string) (*shared.RuntimeValue, *errors.RuntimeError)
- func (e *Environment) Resolve(varname string) (*Environment, *errors.RuntimeError)
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 (e *Environment) AssignVar(name string, value shared.RuntimeValue) (*shared.RuntimeValue, *errors.RuntimeError)
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)
Click to show internal directories.
Click to hide internal directories.