Documentation ¶
Index ¶
Constants ¶
const MaxDepth = 25
Variables ¶
This section is empty.
Functions ¶
func FromRecord ¶
creates a scope from a record requires kinds so that unit tests can create sub-records safely
func NewReadOnlyValue ¶
creates a scope that provides a single named value; errors if the author tries to *replace* the value, noting that altering the *contents* of a value does not cause an error. ( ex. altering the fields of a record value or the elements of an array. )
Types ¶
type Chain ¶
a linked list of scopes: if a variable isnt found in the first scope, the next is searched, and so on.
func (*Chain) FieldByName ¶
FieldByName returns the value at 'field'
func (*Chain) ReplaceScope ¶
rewrite the current scope as the passed scope returns the previous scope ( used for function calls; they "hide" all variables from the caller stack )
func (*Chain) RestoreScope ¶
type Pairs ¶
type Pairs struct {
// contains filtered or unexported fields
}
a scope which provides a single named field.
type SingleValue ¶
type SingleValue struct {
// contains filtered or unexported fields
}
a scope which provides a single named field.
func NewSingleValue ¶
func NewSingleValue(name string, val rt.Value) *SingleValue
func (*SingleValue) FieldByName ¶
func (k *SingleValue) FieldByName(field string) (ret rt.Value, err error)
func (*SingleValue) SetFieldByName ¶
func (k *SingleValue) SetFieldByName(field string, val rt.Value) (err error)