Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repl ¶
type Repl struct {
// contains filtered or unexported fields
}
func NewRepl ¶
func NewRepl(opts ...ReplOption) *Repl
NewRepl creates a Repl struct. It is able to process input source code and eventually run it.
func (*Repl) Debug ¶
func (r *Repl) Debug()
Debug activates the GnoVM debugger for the next evaluation.
func (*Repl) Process ¶
Process accepts any valid Gno source code and executes it if it is an expression, or stores it for later use if they are declarations. If the provided input is not valid Gno source code, an error is returned. If the execution on the VM is not successful, the panic is recovered and returned as an error.
type ReplOption ¶
type ReplOption func(*Repl)
func WithStd ¶
func WithStd(stdin io.Reader, stdout, stderr io.Writer) ReplOption
WithStd changes std's reader and writers implementations. An internal bytes.Buffer is used by default.
func WithStore ¶
func WithStore(s gno.Store) ReplOption
WithStore allows to modify the default Store implementation used by the VM. If nil is provided, the VM will use a default implementation.