gsvm

package
v0.0.0-...-6dad5f1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2016 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConstValueType = reflect.TypeOf(ConstValue{})
View Source
var (
	FragmentErr = errors.New("Fragment")
)
View Source
var MapIndexValueType = reflect.TypeOf(MapIndexValue{})
View Source
var NakedFuncType = reflect.TypeOf(func() {})
View Source
var (
	NoValue = reflect.ValueOf(noValueType(nil))
)
View Source
var PackageType = reflect.TypeOf(Package(nil))
View Source
var TypeValueType = reflect.TypeOf(TypeValue{})

Functions

func PtrToTypeValue

func PtrToTypeValue(ptr interface{}) reflect.Value

func ToConstant

func ToConstant(vl reflect.Value) reflect.Value

Types

type BranchErr

type BranchErr int

func (BranchErr) Error

func (e BranchErr) Error() string

type ConstValue

type ConstValue struct {
	reflect.Value
}

Holding a constant value

type Machine

type Machine interface {
	Run(line string) error
}

func New

func New(initNS NameSpace) Machine

type MapIndexValue

type MapIndexValue struct {
	// a map Value
	X reflect.Value
	// a value same typed with X.Type().Key()
	Key reflect.Value
}

type NameSpace

type NameSpace interface {
	// Returns a reflect.Value
	Find(ident string) (v reflect.Value)
	// Returns a reflect.Value
	FindLocal(ident string) (v reflect.Value)
	// Adding a reflect.Value
	AddLocal(ident string, v reflect.Value)
	// Returns a namespace for a new block
	NewBlock() NameSpace
}

func NewNameSpace

func NewNameSpace() NameSpace

func NewNameSpaceBlock

func NewNameSpaceBlock(ns NameSpace) NameSpace

type Package

type Package map[string]reflect.Value

type PackageNameSpace

type PackageNameSpace struct {
	Packages map[string]Package
}

func (*PackageNameSpace) AddLocal

func (p *PackageNameSpace) AddLocal(ident string, v reflect.Value)

func (*PackageNameSpace) Find

func (p *PackageNameSpace) Find(ident string) (v reflect.Value)

func (*PackageNameSpace) FindLocal

func (p *PackageNameSpace) FindLocal(ident string) (v reflect.Value)

func (*PackageNameSpace) NewBlock

func (p *PackageNameSpace) NewBlock() NameSpace

type TypeValue

type TypeValue struct {
	reflect.Type
}

Holding a type value

type UndefinedError

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

Jump to

Keyboard shortcuts

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