environment

package
v0.0.0-...-5957b22 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Values map[string]object.Object
	Parent *Environment
}

func New

func New() *Environment

func NewChildEnvironment

func NewChildEnvironment(parent *Environment) *Environment

func (*Environment) Define

func (e *Environment) Define(name string, value object.Object)

func (*Environment) Exists

func (e *Environment) Exists(name string) bool

Check if a name exists within the environment.

func (*Environment) Get

func (e *Environment) Get(name string) object.Object

func (*Environment) Set

func (e *Environment) Set(name string, value object.Object)

This method can potentially take in other context parameters So that there can be a check for something like -Wshadow

func (*Environment) SetIndex

func (e *Environment) SetIndex(name string, index object.Object, value object.Object)

func (*Environment) SetStruct

func (e *Environment) SetStruct(name string, attribute string, value object.Object)

Jump to

Keyboard shortcuts

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