repl

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source

Logo is the ASCII banner shown at REPL start and at the top of `help`. Tagline / control-key info is intentionally NOT embedded — Start() and printHelp() print their own context-appropriate footer so the messages don't conflict (Ctrl+C cancels input; Ctrl+D exits).

View Source
const Oops = `` /* 554-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type REPL

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

func NewREPL

func NewREPL(v *vm.VM, in io.Reader, out io.Writer) *REPL

NewREPL builds a REPL bound to v. The `in` argument is accepted for API stability but unused: input is read through the readline instance, which drives its own terminal handle.

func (*REPL) AddPostInit

func (r *REPL) AddPostInit(fn func(*vm.VM))

AddPostInit appends a hook that runs against every VM this REPL owns. The hook is also applied to the current VM immediately so callers don't need to invoke it separately. Multiple calls compose — every hook runs in the order it was added.

func (*REPL) DisassembleFile

func (r *REPL) DisassembleFile(path string)

func (*REPL) RunFile

func (r *REPL) RunFile(path string)

func (*REPL) Start

func (r *REPL) Start()

func (*REPL) WatchFile

func (r *REPL) WatchFile(filePath string) error

Jump to

Keyboard shortcuts

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