repl

package
v5.12.4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonPrefix added in v5.11.2

func CommonPrefix(vals []string) string

func Run

func Run(c zc.Calc)

func Test

func Test(r *REPL, test string) bool

Types

type Cmd

type Cmd func(*REPL, *scan.Scanner) error

type REPL

type REPL struct {
	MaxUndo  int
	Calc     zc.Calc
	Out      io.Writer
	EndQuote string
	// contains filtered or unexported fields
}

func New

func New(calc zc.Calc) *REPL

func (*REPL) Close

func (r *REPL) Close()

func (*REPL) Error added in v5.7.0

func (r *REPL) Error() error

func (*REPL) Eval

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

func (*REPL) Info added in v5.7.0

func (r *REPL) Info() string

func (*REPL) Init

func (r *REPL) Init()

func (*REPL) ReadLine

func (r *REPL) ReadLine() (string, error)

func (*REPL) WordCompleter added in v5.11.2

func (r *REPL) WordCompleter(line string, pos int) (string, []string, string)

Jump to

Keyboard shortcuts

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