interp

package
v0.0.0-...-a54ad32 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Unbound = unbound{}

Functions

This section is empty.

Types

type Context

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

func NewContext

func NewContext() *Context

func (*Context) Bind

func (c *Context) Bind(name skim.Symbol, value skim.Atom) *Context

func (*Context) BindProc

func (c *Context) BindProc(name skim.Symbol, proc Proc) *Context

func (*Context) Dup

func (c *Context) Dup() *Context

Dup clones a context, flattening it into a single Context of known bindings and c's upvalues.

func (*Context) Eval

func (c *Context) Eval(a skim.Atom) (result skim.Atom, err error)

func (*Context) Fork

func (c *Context) Fork() *Context

func (*Context) Overlay

func (c *Context) Overlay(parent *Context) *Context

func (*Context) Parent

func (c *Context) Parent() *Context

func (*Context) Resolve

func (c *Context) Resolve(name skim.Symbol) (value skim.Atom, ok bool)

func (*Context) SetUpvalue

func (c *Context) SetUpvalue(name string, val interface{}) *Context

func (*Context) Unbind

func (c *Context) Unbind(name skim.Symbol) (ok bool)

func (*Context) Upvalue

func (c *Context) Upvalue(name string) interface{}

type Evaler

type Evaler interface {
	skim.Atom

	Eval(*Context, *skim.Cons) (skim.Atom, error)
}

type Proc

type Proc func(*Context, *skim.Cons) (skim.Atom, error)

func (Proc) Eval

func (p Proc) Eval(ctx *Context, form *skim.Cons) (skim.Atom, error)

func (Proc) SkimAtom

func (Proc) SkimAtom()

func (Proc) String

func (p Proc) String() string

Jump to

Keyboard shortcuts

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