activations

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Activation added in v0.6.0

type Activation hamt.Map

func NewActivation added in v0.6.0

func NewActivation() Activation

func (Activation) Find added in v0.6.0

func (a Activation) Find(name string) interface{}

func (Activation) FirstRest added in v0.6.0

func (a Activation) FirstRest() (string, interface{}, Activation)

func (Activation) Insert added in v0.6.0

func (a Activation) Insert(name string, value interface{}) Activation

type Activations

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

Activations is a stack of activation records. Each entry represents a new scope.

func (*Activations) CurrentOrNew

func (a *Activations) CurrentOrNew() Activation

func (*Activations) Depth

func (a *Activations) Depth() int

func (*Activations) Find

func (a *Activations) Find(key string) interface{}

func (*Activations) Pop

func (a *Activations) Pop()

func (*Activations) Push

func (a *Activations) Push(activation Activation)

func (*Activations) PushCurrent

func (a *Activations) PushCurrent()

PushCurrent makes a copy of the current activation, and pushes it to the top of the activation stack, so that the `Find` method only needs to look up a certain record by name from the current activation record without having to go through each activation in the stack.

func (*Activations) Set

func (a *Activations) Set(name string, value interface{})

Set adds the new key value pair to the current scope. The current scope is updated in an immutable way.

Jump to

Keyboard shortcuts

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