eval

package
v0.0.0-...-d472ff9 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2018 License: BSD-2-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalFile

func EvalFile(path string, shellState *shell.State) error

Types

type Panic

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

func (Panic) Error

func (p Panic) Error() string

type Program

type Program struct {
	Universe *Scope
	Cur      *Scope
	Types    *typecheck.Checker
	Pkgs     map[string]*gowrap.Pkg
	Path     string

	ShellState *shell.State
	// contains filtered or unexported fields
}

func New

func New(path string, shellState *shell.State) *Program

func (*Program) Alias

func (p *Program) Alias() *environ.Environ

func (*Program) Environ

func (p *Program) Environ() *environ.Environ

func (*Program) Eval

func (p *Program) Eval(s stmt.Stmt, sigint <-chan os.Signal) (res []reflect.Value, err error)

func (*Program) Get

func (p *Program) Get(name string) string

Get is part of the implementation of shell.Params.

func (*Program) Set

func (p *Program) Set(name, value string)

Set is part of the implementation of shell.Params.

type Scope

type Scope struct {
	Parent  *Scope
	VarName string
	Var     reflect.Value

	// Implicit is set if the Scope was created mid block and should be
	// unrolled when block ends.
	Implicit bool

	Label bool
	// contains filtered or unexported fields
}

func (*Scope) Lookup

func (s *Scope) Lookup(name string) reflect.Value

type UntypedBool

type UntypedBool struct{ Bool bool }

type UntypedComplex

type UntypedComplex struct{ Real, Imag *big.Float }

func (UntypedComplex) String

func (uc UntypedComplex) String() string

type UntypedFloat

type UntypedFloat struct{ *big.Float }

type UntypedInt

type UntypedInt struct{ *big.Int }

type UntypedRune

type UntypedRune struct{ Rune rune }

type UntypedString

type UntypedString struct{ String string }

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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