repl

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

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(opts ...ReplOption) *Repl

NewRepl creates a Repl struct. It is able to process input source code and eventually run it.

func (*Repl) Debug

func (r *Repl) Debug()

Debug activates the GnoVM debugger for the next evaluation.

func (*Repl) Errorf

func (r *Repl) Errorf(fstr string, args ...any)

func (*Repl) Errorfln

func (r *Repl) Errorfln(fstr string, args ...any)

func (*Repl) Errorln

func (r *Repl) Errorln(args ...any)

func (*Repl) Print

func (r *Repl) Print(args ...any)

func (*Repl) Printf

func (r *Repl) Printf(fstr string, args ...any)

func (*Repl) Printfln

func (r *Repl) Printfln(fstr string, args ...any)

func (*Repl) Println

func (r *Repl) Println(args ...any)

func (*Repl) Reset

func (r *Repl) Reset()

Reset will reset the actual repl state, restarting the internal VM.

func (*Repl) RunStatements

func (r *Repl) RunStatements(code string)

type ReplOption

type ReplOption func(*Repl)

func WithIO

func WithIO(input io.Reader, output, errput io.Writer) ReplOption

func WithStore

func WithStore(s gno.Store) ReplOption

WithStore allows to modify the default Store implementation used by the VM. If nil is provided, the VM will use a default implementation.

Jump to

Keyboard shortcuts

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