repl

package
v0.7.18 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

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 {
	// contains filtered or unexported fields
}

REPL type

func New

func New() *REPL

New creates a REPL object.

func (*REPL) Run

func (r *REPL) Run(line string)

Run handles one line.

func (*REPL) SetUI

func (r *REPL) SetUI(term UI)

SetUI initializes UI.

type UI

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

UI represents the UserInterface interacting abstraction.

Jump to

Keyboard shortcuts

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