vm

package
v0.0.0-...-e582a83 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallStack

type CallStack struct {
	Frames []callStackFrame
}

func NewCallStack

func NewCallStack() *CallStack

func (*CallStack) Shift

func (stack *CallStack) Shift()

func (*CallStack) String

func (stack *CallStack) String() string

func (*CallStack) Unshift

func (stack *CallStack) Unshift(method, file string, lineNumber int)

type LocalVariableStack

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

func NewLocalVariableStack

func NewLocalVariableStack() *LocalVariableStack

func (*LocalVariableStack) Retrieve

func (stack *LocalVariableStack) Retrieve(key string) (builtins.Value, error)

func (*LocalVariableStack) Shift

func (stack *LocalVariableStack) Shift()

func (*LocalVariableStack) Store

func (stack *LocalVariableStack) Store(key string, value builtins.Value)

func (*LocalVariableStack) Unshift

func (stack *LocalVariableStack) Unshift()

func (*LocalVariableStack) UnshiftCopyingCurrentFrame

func (stack *LocalVariableStack) UnshiftCopyingCurrentFrame()

type ParseError

type ParseError struct {
	Filename string
}

func NewParseError

func NewParseError(filename string) *ParseError

func (*ParseError) Error

func (err *ParseError) Error() string

type VM

type VM interface {
	Run(string) (Value, error)
	Exit()

	Get(string) (Value, error)
	MustGet(string) Value

	GetClass(string) (Class, error)
	MustGetClass(string) Class

	GetModule(string) (Module, error)
	MustGetModule(string) Module

	Set(string, Value)

	Symbols() map[string]Value
	Globals() map[string]Value
	Classes() map[string]Class
	Modules() map[string]Module

	Provider
	ArgEvaluator
	ClassProvider
	SingletonProvider
	StackProvider
}

func NewVM

func NewVM(rubyHome, name string) VM

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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