repl

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCompleter

func NewCompleter() prompt.Completer

func NewExecutor

func NewExecutor(repl REPL) prompt.Executor

Types

type PromptFunc

type PromptFunc func()

func Initialize

func Initialize() PromptFunc

func NewPrompt

func NewPrompt(repl REPL, executor prompt.Executor, completer prompt.Completer) PromptFunc

type REPL

type REPL interface {
	Eval(input string) error
	IsContinuation() bool
}

func NewREPL

func NewREPL(state *State, thread *starlark.Thread, predeclared builtin.Predeclared) REPL

type State

type State struct {
	Continuation bool
	Inputs       []string
	// contains filtered or unexported fields
}

func NewState

func NewState() *State

func (*State) AppendInput

func (s *State) AppendInput(val string)

func (*State) Readline

func (s *State) Readline() ([]byte, error)

func (*State) Reset

func (s *State) Reset()

Jump to

Keyboard shortcuts

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