Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interpreter ¶
type Interpreter struct { // the cosh shell Shell *shell.Shell // the yaegi interpreter Interp *interp.Interpreter }
Interpreter represents one running shell context
func NewInterpreter ¶
func NewInterpreter(options interp.Options) *Interpreter
NewInterpreter returns a new Interpreter initialized with the given options.
func (*Interpreter) Eval ¶
func (in *Interpreter) Eval(code string) error
Eval evaluates (interprets) the given code.
func (*Interpreter) Prompt ¶
func (in *Interpreter) Prompt() string
Prompt returns the appropriate REPL prompt to show the user.
func (*Interpreter) RunCode ¶
func (in *Interpreter) RunCode() error
RunCode runs the accumulated set of code lines and clears the stack.
Click to show internal directories.
Click to hide internal directories.