Versions in this module Expand all Collapse all v0 v0.3.0 Apr 26, 2016 Changes in this version + var BoolType = universe.DefineType("bool", universePos, &boolType{}) + var Float32Type = universe.DefineType("float32", universePos, &floatType{ ... }) + var Float64Type = universe.DefineType("float64", universePos, &floatType{ ... }) + var Int16Type = universe.DefineType("int16", universePos, &intType{ ... }) + var Int32Type = universe.DefineType("int32", universePos, &intType{ ... }) + var Int64Type = universe.DefineType("int64", universePos, &intType{ ... }) + var Int8Type = universe.DefineType("int8", universePos, &intType{ ... }) + var IntType = universe.DefineType("int", universePos, &intType{ ... }) + var StringType = universe.DefineType("string", universePos, &stringType{}) + var Uint16Type = universe.DefineType("uint16", universePos, &uintType{ ... }) + var Uint32Type = universe.DefineType("uint32", universePos, &uintType{ ... }) + var Uint64Type = universe.DefineType("uint64", universePos, &uintType{ ... }) + var Uint8Type = universe.DefineType("uint8", universePos, &uintType{ ... }) + var UintType = universe.DefineType("uint", universePos, &uintType{ ... }) + var UintptrType = universe.DefineType("uintptr", universePos, &uintType{ ... }) + func FuncFromNativeTyped(fn func(*Thread, []Value, []Value), t interface{}) (*FuncType, FuncValue) + type ArrayType struct + Elem Type + Len int64 + func NewArrayType(len int64, elem Type) *ArrayType + func (t *ArrayType) String() string + func (t *ArrayType) Zero() Value + type ArrayValue interface + Elem func(*Thread, int64) Value + Get func(*Thread) ArrayValue + Sub func(i int64, len int64) ArrayValue + type BoolValue interface + Get func(*Thread) bool + Set func(*Thread, bool) + type BoundedType interface + type Code interface + Run func() (Value, error) + Type func() Type + type Constant struct + ConstPos token.Pos + Type Type + Value Value + func (c *Constant) Pos() token.Pos + type Def interface + Pos func() token.Pos + type DivByZeroError struct + func (DivByZeroError) Error() string + type FloatValue interface + Get func(*Thread) float64 + Set func(*Thread, float64) + type Frame struct + Outer *Frame + Vars []Value + func (f *Frame) Get(level int, index int) Value + type Func interface + Call func(*Thread) + NewFrame func() *Frame + type FuncDecl struct + InNames []*ast.Ident + Name *ast.Ident + OutNames []*ast.Ident + Type *FuncType + func (t *FuncDecl) String() string + type FuncType struct + In []Type + Out []Type + Variadic bool + func NewFuncType(in []Type, variadic bool, out []Type) *FuncType + func (t *FuncType) String() string + func (t *FuncType) Zero() Value + type FuncValue interface + Get func(*Thread) Func + Set func(*Thread, Func) + func FuncFromNative(fn func(*Thread, []Value, []Value), t *FuncType) FuncValue + type IMethod struct + Name string + Type *FuncType + type IdealFloatValue interface + Get func() *big.Rat + type IdealIntValue interface + Get func() *big.Int + type IndexError struct + Idx int64 + Len int64 + func (e IndexError) Error() string + type IntValue interface + Get func(*Thread) int64 + Set func(*Thread, int64) + type Interface struct + Type Type + Value Value + type InterfaceType struct + func NewInterfaceType(methods []IMethod, embeds []*InterfaceType) *InterfaceType + func (t *InterfaceType) String() string + func (t *InterfaceType) Zero() Value + type InterfaceValue interface + Get func(*Thread) Interface + Set func(*Thread, Interface) + type KeyError struct + Key interface{} + func (e KeyError) Error() string + type Map interface + Elem func(t *Thread, key interface{}) Value + Iter func(func(key interface{}, val Value) bool) + Len func(*Thread) int64 + SetElem func(t *Thread, key interface{}, val Value) + type MapType struct + Elem Type + Key Type + func NewMapType(key Type, elem Type) *MapType + func (t *MapType) String() string + func (t *MapType) Zero() Value + type MapValue interface + Get func(*Thread) Map + Set func(*Thread, Map) + type Method struct + type MultiType struct + Elems []Type + func NewMultiType(elems []Type) *MultiType + func (t *MultiType) String() string + func (t *MultiType) Zero() Value + type NamedType struct + Def Type + Name string + NamePos token.Pos + func NewNamedType(name string) *NamedType + func (t *NamedType) Complete(def Type) + func (t *NamedType) Pos() token.Pos + func (t *NamedType) String() string + func (t *NamedType) Zero() Value + type NegativeCapacityError struct + Len int64 + func (e NegativeCapacityError) Error() string + type NegativeLengthError struct + Len int64 + func (e NegativeLengthError) Error() string + type NilPointerError struct + func (NilPointerError) Error() string + type PackageValue interface + Get func(*Thread) PackageValue + Ident func(*Thread, int) Value + type PkgIdent struct + PkgPos token.Pos + func (p *PkgIdent) Pos() token.Pos + type PtrType struct + Elem Type + func NewPtrType(elem Type) *PtrType + func (t *PtrType) String() string + func (t *PtrType) Zero() Value + type PtrValue interface + Get func(*Thread) Value + Set func(*Thread, Value) + type RedefinitionError struct + Name string + Prev Def + func (e *RedefinitionError) Error() string + type Scope struct + func (b Scope) ChildScope() *Scope + func (b Scope) DefineConst(name string, pos token.Pos, t Type, v Value) (*Constant, Def) + func (b Scope) DefinePackage(id, path string, pos token.Pos) (*PkgIdent, Def) + func (b Scope) DefineTemp(t Type) *Variable + func (b Scope) DefineType(name string, pos token.Pos, t Type) Type + func (b Scope) DefineVar(name string, pos token.Pos, t Type) (*Variable, Def) + func (b Scope) Lookup(name string) (bl *block, level int, def Def) + func (s *Scope) NewFrame(outer *Frame) *Frame + type Slice struct + Base ArrayValue + Cap int64 + Len int64 + type SliceError struct + Cap int64 + Hi int64 + Lo int64 + func (e SliceError) Error() string + type SliceType struct + Elem Type + func NewSliceType(elem Type) *SliceType + func (t *SliceType) String() string + func (t *SliceType) Zero() Value + type SliceValue interface + Get func(*Thread) Slice + Set func(*Thread, Slice) + type StringValue interface + Get func(*Thread) string + Set func(*Thread, string) + type StructField struct + Anonymous bool + Name string + Type Type + type StructType struct + Elems []StructField + func NewStructType(fields []StructField) *StructType + func (t *StructType) String() string + func (t *StructType) Zero() Value + type StructValue interface + Field func(*Thread, int) Value + Get func(*Thread) StructValue + type Thread struct + func (t *Thread) Abort(err error) + func (t *Thread) Try(f func(t *Thread)) error + type Type interface + String func() string + Zero func() Value + var EmptyType Type = NewMultiType([]Type{}) + var IdealFloatType Type = &idealFloatType{} + var IdealIntType Type = &idealIntType{} + func TypeFromNative(t reflect.Type) Type + func TypeOfNative(v interface{}) Type + type UintValue interface + Get func(*Thread) uint64 + Set func(*Thread, uint64) + type Value interface + Assign func(t *Thread, o Value) + String func() string + type Variable struct + Index int + Init Value + Type Type + VarPos token.Pos + func (v *Variable) Pos() token.Pos + type World struct + func NewWorld() *World + func (w *World) Compile(fset *token.FileSet, text string) (Code, error) + func (w *World) CompileDeclList(fset *token.FileSet, decls []ast.Decl) (Code, error) + func (w *World) CompileExpr(fset *token.FileSet, e ast.Expr) (Code, error) + func (w *World) CompilePackage(fset *token.FileSet, files []*ast.File, pkgpath string) (Code, error) + func (w *World) CompileStmtList(fset *token.FileSet, stmts []ast.Stmt) (Code, error) + func (w *World) DefineConst(name string, t Type, val Value) error + func (w *World) DefineVar(name string, t Type, val Value) error