active

package
v0.0.0-...-486fa54 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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 IncludeModule(vm *ja.Runtime, modname string)

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 NewVM

func NewVM(a ...interface{}) (vm *VM)

func (*VM) Close

func (vm *VM) Close()

func (*VM) Eval

func (vm *VM) Eval(a ...interface{}) (val interface{}, err error)

func (*VM) Get

func (vm *VM) Get(objname string) (obj interface{})

func (*VM) InvokeFunction

func (vm *VM) InvokeFunction(functocall interface{}, args ...interface{}) (result interface{})

func (*VM) Print

func (vm *VM) Print(a ...interface{}) (err error)

func (*VM) Println

func (vm *VM) Println(a ...interface{}) (err error)

func (*VM) Read

func (vm *VM) Read(p ...byte) (n int, err error)

func (*VM) ReadAll

func (vm *VM) ReadAll() (all string, err error)

func (*VM) ReadLines

func (vm *VM) ReadLines() (lines []string, err error)

func (*VM) Readln

func (vm *VM) Readln() (ln string, err error)

func (*VM) Remove

func (vm *VM) Remove(objname string)

func (*VM) Set

func (vm *VM) Set(objname string, obj interface{})

func (*VM) SetPrinter

func (vm *VM) SetPrinter(w io.Writer)

func (*VM) SetReader

func (vm *VM) SetReader(r io.Reader)

func (*VM) SetReaderPrinter

func (vm *VM) SetReaderPrinter(r io.Reader, w io.Writer)

func (*VM) Write

func (vm *VM) Write(p ...byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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