Documentation ¶
Index ¶
- type CompileOption
- type SExpressions
- type VM
- func (v *VM) CodeString() string
- func (v *VM) Copy() VM
- func (vm *VM) Env(k any, v any)
- func (vm *VM) EnvFloat32(k string, v float32)
- func (vm *VM) EnvFloat64(k string, v float64)
- func (vm *VM) EnvInt(k string, v int)
- func (vm *VM) EnvInt64(k string, v int64)
- func (vm *VM) EnvString(k string, v string)
- func (v *VM) Execute() (errRes error)
- func (v *VM) Reset()
- func (v *VM) Result() any
- type VMByteCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompileOption ¶
type CompileOption func(bt *VMByteCode)
func EnableDebugSymbols ¶
func EnableDebugSymbols() CompileOption
func EnvVariables ¶
func EnvVariables(env ...string) CompileOption
func ExtFunctions ¶
func ExtFunctions(funcs map[string]any) (CompileOption, error)
func ExtFunctionsOrPanic ¶
func ExtFunctionsOrPanic(funcs map[string]any) CompileOption
type SExpressions ¶
type SExpressions []any
func Read ¶
func Read(sourceCode string) (SExpressions, error)
type VM ¶
type VM struct {
// contains filtered or unexported fields
}
func NewVM ¶
func NewVM(output *VMByteCode) *VM
func (*VM) CodeString ¶
func (*VM) EnvFloat32 ¶
func (*VM) EnvFloat64 ¶
type VMByteCode ¶
type VMByteCode struct {
// contains filtered or unexported fields
}
func Compile ¶
func Compile(text string, options ...CompileOption) (_ *VMByteCode, err error)
Click to show internal directories.
Click to hide internal directories.