interp

package
v0.0.0-...-3dd9939 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeString

func TypeString(typ types.Type) string

TypeString returns the string representation of typ. Named types are printed package-qualified if they do not belong to this package.

func WriteSignature

func WriteSignature(buf *bytes.Buffer, sig *types.Signature)

WriteSignature writes the representation of the signature sig to buf, without a leading "func" keyword. Named types are printed package-qualified if they do not belong to this package.

func WriteType

func WriteType(buf *bytes.Buffer, typ types.Type)

WriteType writes the string representation of typ to buf. Named types are printed package-qualified if they do not belong to this package.

Types

type Interpreter

type Interpreter interface {
	Run(src string) (bool, error)
}

func NewInterpreter

func NewInterpreter(pkgs []*Package, pkgMap map[string]*types.Package, typeMap *typeutil.Map) Interpreter

type Object

type Object struct {
	Value interface{}
	Typ   types.Type
	Sim   bool
}

type Package

type Package struct {
	Name string
	Objs map[string]Object
	Pkg  *types.Package
}

func (*Package) Lookup

func (pkg *Package) Lookup(s string) (Object, bool)

Jump to

Keyboard shortcuts

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