eval

package
v0.0.0-...-67a1e62 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Log = log.New("eval")
)

Functions

func Register

func Register(m Exports)

Register additional libraries for the interpreter.

Types

type Exports

type Exports struct {
	Symbols interp.Exports
	Context func(ctx context.Context, g script.Game) context.Context
}

type VM

type VM struct {
	// contains filtered or unexported fields
}

func NewVM

func NewVM(g script.Game, dir string) *VM

func (*VM) Close

func (vm *VM) Close() error

func (*VM) Exec

func (vm *VM) Exec(s string) (reflect.Value, error)

func (*VM) ExecFile

func (vm *VM) ExecFile(pkg string) error

func (*VM) GetSymbol

func (vm *VM) GetSymbol(name string, typ reflect.Type) (reflect.Value, bool, error)

func (*VM) OnEvent

func (vm *VM) OnEvent(typ script.EventType)

func (*VM) OnFrame

func (vm *VM) OnFrame()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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