interpreter

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportType

func ExportType[T any](i Instance) error

Types

type ErrInvalidIdentifier

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

func (ErrInvalidIdentifier) Error

func (e ErrInvalidIdentifier) Error() string

type EvalResult

type EvalResult int
const (
	HelpPrinted        EvalResult = 0
	GoCodeExecuted     EvalResult = 1
	Resumed            EvalResult = 2
	Paused             EvalResult = 3
	Undoed             EvalResult = 4
	Continued          EvalResult = 5
	NextFrameRequested EvalResult = 6
)

type Instance

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

func New

func New(printHelp func(topic string) error) (Instance, error)

func (Instance) Eval

func (i Instance) Eval(cmd string) (EvalResult, error)

func (Instance) Export

func (i Instance) Export(name string, f any) error

func (Instance) SetDraw

func (i Instance) SetDraw(draw *func()) error

func (Instance) SetUpdate

func (i Instance) SetUpdate(update *func()) error

Jump to

Keyboard shortcuts

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