environment

package
v0.0.0-...-e98e1b7 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 3 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 {
	// contains filtered or unexported fields
}

func New

func New(enclosing *Environment) *Environment

func (*Environment) Assgin

func (env *Environment) Assgin(t expressions.Token, value interface{}) error

func (*Environment) AssginAt

func (env *Environment) AssginAt(level int, t expressions.Token, value interface{}) error

func (*Environment) Define

func (env *Environment) Define(name string, value interface{})

func (*Environment) Get

func (env *Environment) Get(t expressions.Token) (interface{}, error)

func (*Environment) GetAt

func (env *Environment) GetAt(level int, t expressions.Token) (interface{}, error)

walks a fixed number of predecessors up the parent chain and returns the value of the variable in that environment’s map. It doesn’t check if the variable exists because the resolver already found it.

func (*Environment) GetEnclosing

func (env *Environment) GetEnclosing() *Environment

type ErrorUndefinedVairable

type ErrorUndefinedVairable struct {
	// contains filtered or unexported fields
}

func (ErrorUndefinedVairable) Error

func (e ErrorUndefinedVairable) Error() string

Jump to

Keyboard shortcuts

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