yaegi

package
v0.0.0-...-692c41c Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCanceled = errors.New("canceled")

Functions

func UnfoldError

func UnfoldError(err error, res ErrorResult)

func UseNotebookAPI

func UseNotebookAPI(s *Session, send func(notebook.Formatter)) error

func UseVSCodeAPI

func UseVSCodeAPI(s *Session, api VSCodeAPI) error

Types

type ErrorResult

type ErrorResult interface {
	AddError(message, stack string)
	AddErrorAt(message, stack string, line, col int)
}

type EvalOptions

type EvalOptions struct {
	OnStdout func([]byte)
	OnStderr func([]byte)
	OnPanic  func(interface{})
}

type HaltEval

type HaltEval struct {
	Value interface{}
}

type Session

type Session struct {
	// contains filtered or unexported fields
}

func NewSession

func NewSession(ctx context.Context) *Session

func (*Session) Eval

func (s *Session) Eval(ctx context.Context, code string, opts EvalOptions) (reflect.Value, time.Duration, error)

func (*Session) ImportUsed

func (s *Session) ImportUsed()

func (*Session) Package

func (s *Session) Package(name string) *exportBuilder

func (*Session) Use

func (s *Session) Use(exports interp.Exports) error

type VSCodeAPI

type VSCodeAPI interface {
	Done() <-chan struct{}

	Prompt(*kernelpb.VSCode_Prompt)
	Prompted() <-chan *kernelpb.VSCode_Prompted

	ReadCache(*kernelpb.VSCode_ReadCache)
	WriteCache(*kernelpb.VSCode_WriteCache)
	Cached() <-chan *kernelpb.VSCode_Cached
}

Jump to

Keyboard shortcuts

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