Documentation ¶
Index ¶
- Variables
- func IncludeModule(vm *ja.Runtime, modname string)
- func LoadGlobalModule(modname string, a ...interface{})
- type Runtime
- type RuntimeFunc
- type VM
- func (vm *VM) Close()
- func (vm *VM) Eval(a ...interface{}) (val interface{}, err error)
- func (vm *VM) Get(objname string) (obj interface{})
- func (vm *VM) InvokeFunction(functocall interface{}, args ...interface{}) (result interface{})
- func (vm *VM) Print(a ...interface{}) (err error)
- func (vm *VM) Println(a ...interface{}) (err error)
- func (vm *VM) Read(p ...byte) (n int, err error)
- func (vm *VM) ReadAll() (all string, err error)
- func (vm *VM) ReadLines() (lines []string, err error)
- func (vm *VM) Readln() (ln string, err error)
- func (vm *VM) Remove(objname string)
- func (vm *VM) Set(objname string, obj interface{})
- func (vm *VM) SetPrinter(w io.Writer)
- func (vm *VM) SetReader(r io.Reader)
- func (vm *VM) SetReaderPrinter(r io.Reader, w io.Writer)
- func (vm *VM) Write(p ...byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTransformCode func(code string) (transformedcode string, errors []string, warnings []string)
View Source
var VMSourceLoader require.SourceLoader
Functions ¶
func IncludeModule ¶
func LoadGlobalModule ¶
func LoadGlobalModule(modname string, a ...interface{})
Types ¶
type Runtime ¶
type Runtime interface {
InvokeFunction(interface{}, ...interface{}) interface{}
}
Runtime - interface
type RuntimeFunc ¶
type RuntimeFunc func(interface{}, ...interface{}) interface{}
func (RuntimeFunc) InvokeFunction ¶
func (rntmefn RuntimeFunc) InvokeFunction(event interface{}, args ...interface{}) interface{}
type VM ¶
type VM struct { DisposeObject func(string, interface{}) W io.Writer R io.Reader ErrPrint func(...interface{}) error // contains filtered or unexported fields }
func (*VM) InvokeFunction ¶
func (vm *VM) InvokeFunction(functocall interface{}, args ...interface{}) (result interface{})
func (*VM) SetPrinter ¶
Click to show internal directories.
Click to hide internal directories.