eval

package
v0.0.0-...-1c33fca Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: BSD-2-Clause Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	False = reflect.ValueOf(false)
	True  = reflect.ValueOf(true)
	Nil   = reflect.ValueOf(nil)

	ErrInvalidValue = errors.New("reflect.Value is invalid")
	ErrReturnValue  = errors.New("return value is set")
)
View Source
var PkgLogger logger

Functions

This section is empty.

Types

type Context

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

func NewContext

func NewContext(identifiers map[string]interface{}) (*Context, error)

func (*Context) Eval

func (c *Context) Eval(node ast.Node) (*reflect.Value, error)

type EvalError

type EvalError struct {
	ast.Node
	Type string
	Msg  string
}

func (EvalError) Error

func (e EvalError) Error() string

type Scope

type Scope struct {
	Objects map[string]interface{}
}

func NewScope

func NewScope() *Scope

func (*Scope) Insert

func (s *Scope) Insert(k string, v interface{})

func (*Scope) Lookup

func (s *Scope) Lookup(name string) interface{}

Jump to

Keyboard shortcuts

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