Documentation
¶
Index ¶
- Constants
- type Object
- type RunOption
- type Type
- type VM
- func (v *VM) Call(name string, xRets int, params ...Value) (rets []Value, err error)
- func (v *VM) Eval(sys fs.FS, fname, input string, options ...RunOption) (rets []Value, err error)
- func (v *VM) Func(fnc Value, xRets int, params ...Value) (rets []Value, err error)
- func (v *VM) Get(key string) Value
- func (v *VM) Load(sys fs.FS, arg string, options ...RunOption) error
- func (v *VM) Set(key string, value Value)
- func (v *VM) Yield()
- type VMOption
- type Value
- func Bool(v bool) Value
- func Byte(v byte) Value
- func Error(err error) Value
- func Float64(v float64) Value
- func Int(v int) Value
- func Int32(v int32) Value
- func Int8(v int8) Value
- func NewFunc[...](argc, rets int, fnc F) (res Value)
- func NewMap(keyType, valueType Type, in []Value) Value
- func NewSlice(valueType Type, data []Value) Value
- func NewStruct(base Value, data []Value) Value
- func Nil() Value
- func String(v string) Value
- func Uint(v uint) Value
- func Uint32(v uint32) Value
- func Uint8(v uint8) Value
- func Wrap(o Object) Value
- func (v Value) Append(items ...Value) Value
- func (v Value) Bool() bool
- func (v Value) Byte() byte
- func (v Value) Delete(key Value)
- func (v Value) Equals(b Value) bool
- func (v Value) Float64() float64
- func (v Value) Get(key Value) (Value, bool)
- func (v Value) GetAttr(key string) Value
- func (v Value) Int() int
- func (v Value) Int32() int32
- func (v Value) Int8() int8
- func (v Value) IsNil() bool
- func (v Value) Len() int
- func (v Value) Range() func() (Value, Value, bool)
- func (v Value) Set(key, value Value)
- func (v Value) SetAttr(key string, value Value)
- func (v Value) Slice(i, j int) Value
- func (v Value) String() string
- func (v Value) Type() Type
- func (v Value) Uint() uint
- func (v Value) Uint32() uint32
- func (v Value) Uint8() uint8
- func (v Value) Unwrap() Object
Constants ¶
View Source
const ( TypeNil = Type(0b00000000) TypeUint8 = Type(0b00000011) TypeInt8 = Type(0b00010011) TypeUint32 = Type(0b00000111) TypeInt32 = Type(0b00010111) TypeFloat64 = Type(0b00011111) TypeBool = Type(0b00100000) TypeString = Type(0b01000000) TypeObject = Type(0b01100000) TypeSlice = Type(0b10000000) TypeMap = Type(0b10100000) TypeFunc = Type(0b11000000) TypeStruct = Type(0b11100000) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RunOption ¶
type RunOption func(*runConfig)
func WithCodeDump ¶
func WithEvalImports ¶
func WithTreeDump ¶
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.