vm

package
v0.0.0-...-f2efcc2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadStdlib

func LoadStdlib(mem *Memory, name string)

Types

type Memory

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

func NewMemory

func NewMemory(v bool) *Memory

func (*Memory) AccessMethod

func (mem *Memory) AccessMethod(qualname string) (*lang.Method, error)

func (*Memory) AccessVar

func (mem *Memory) AccessVar(name string) (lang.Type, error)

func (*Memory) Init

func (mem *Memory) Init(opts *lang.Options)

func (*Memory) LoadBuiltins

func (mem *Memory) LoadBuiltins()

func (*Memory) LoadMethod

func (mem *Memory) LoadMethod(name string, method *lang.Method)

func (*Memory) LoadModule

func (mem *Memory) LoadModule(name string)

func (*Memory) MethodExists

func (mem *Memory) MethodExists(qualname string) (*lang.Method, bool)

func (*Memory) VarCreate

func (mem *Memory) VarCreate(name string, value interface{})

func (*Memory) VarExists

func (mem *Memory) VarExists(name string) (lang.Type, bool)

func (*Memory) VarUpdate

func (mem *Memory) VarUpdate(name string, value interface{}) error

type VM

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

The VM struct will be the holder of all the subcomponents of the VM

func NewVM

func NewVM(parser *parser.Parser) *VM

func (*VM) Run

func (vm *VM) Run()

func (*VM) SetAST

func (vm *VM) SetAST(ast []interface{})

Jump to

Keyboard shortcuts

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