taigo

package
v0.0.0-...-13b959d Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Eval

func Eval[T any](env *taivm.Env, src any) (ret T, err error)

func Get

func Get[T any](env *taivm.Env, name string) (T, error)

func TypedEval

func TypedEval(env *taivm.Env, src any, typ reflect.Type) (any, error)

Types

type Env

type Env struct {
	Globals map[string]any

	Stdin  io.Reader // if nil, default to os.Stdin
	Stdout io.Writer // if nil, default to os.Stdout
	Stderr io.Writer // if nil, default to os.Stderr

	FilePatterns []string
	Source       any
	SourceName   string
	FileSet      *token.FileSet
	Files        []*ast.File
	Package      *Package
}

func (*Env) GetFileSet

func (e *Env) GetFileSet() *token.FileSet

func (*Env) GetFiles

func (e *Env) GetFiles() ([]*ast.File, error)

func (*Env) GetPackage

func (e *Env) GetPackage() (*Package, error)

func (*Env) NewVM

func (e *Env) NewVM() (*taivm.VM, error)

func (*Env) RunVM

func (e *Env) RunVM() (*taivm.VM, error)

type Package

type Package struct {
	Name string
	Init *taivm.Function
}

Jump to

Keyboard shortcuts

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