repl

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ContinuePrompt - the current code statement is not completed.
	ContinuePrompt string = "... "
	// NormalPrompt - start of a code statement.
	NormalPrompt string = ">>> "
)

Variables

This section is empty.

Functions

This section is empty.

Types

type REPL

type REPL struct {
	*igop.Repl
	// contains filtered or unexported fields
}

func NewREPL

func NewREPL(mode igop.Mode) *REPL

func (*REPL) Dump added in v0.7.4

func (r *REPL) Dump(expr string)

func (*REPL) IsNormal

func (r *REPL) IsNormal() bool

func (*REPL) Printf added in v0.7.4

func (r *REPL) Printf(_fmt string, a ...interface{})

func (*REPL) Run

func (r *REPL) Run(line string) error

func (*REPL) SetNormal

func (r *REPL) SetNormal()

func (*REPL) SetPrompt added in v0.7.4

func (r *REPL) SetPrompt(prompt string)

func (*REPL) SetUI

func (r *REPL) SetUI(term UI)

func (*REPL) TryDump added in v0.7.4

func (r *REPL) TryDump(expr string) bool

type UI

type UI interface {
	SetPrompt(prompt string)
	Printf(format string, a ...interface{})
}

Jump to

Keyboard shortcuts

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