Documentation ¶
Index ¶
- type Environment
- func (env *Environment) Assgin(t expressions.Token, value interface{}) error
- func (env *Environment) AssginAt(level int, t expressions.Token, value interface{}) error
- func (env *Environment) Define(name string, value interface{})
- func (env *Environment) Get(t expressions.Token) (interface{}, error)
- func (env *Environment) GetAt(level int, t expressions.Token) (interface{}, error)
- func (env *Environment) GetEnclosing() *Environment
- type ErrorUndefinedVairable
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
Click to show internal directories.
Click to hide internal directories.