v0.0.0-...-db593c7 Latest Latest

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

Go to latest
Published: Jan 27, 2015 License: BSD-2-Clause Imports: 16 Imported by: 0




This section is empty.


This section is empty.


func WriteArchive

func WriteArchive(a *Archive, w io.Writer) error

func WritePkgCode

func WritePkgCode(pkg *Archive, minify bool, w *SourceMapFilter) error

func WriteProgramCode

func WriteProgramCode(pkgs []*Archive, w *SourceMapFilter) error


type Archive

type Archive struct {
	ImportPath   string
	Name         string
	Imports      []string
	GcData       []byte
	Declarations []*Decl
	FileSet      []byte
	Minified     bool

func Compile

func Compile(importPath string, files []*ast.File, fileSet *token.FileSet, importContext *ImportContext, minify bool) (*Archive, error)

func ImportDependencies

func ImportDependencies(archive *Archive, importPkg func(string) (*Archive, error)) ([]*Archive, error)

func ReadArchive

func ReadArchive(filename, id string, r io.Reader, packages map[string]*types.Package) (*Archive, error)

type Decl

type Decl struct {
	FullName       string
	Vars           []string
	DeclCode       []byte
	MethodListCode []byte
	TypeInitCode   []byte
	InitCode       []byte
	DceFilters     []string
	DceDeps        []string
	Blocking       bool

type ErrorList

type ErrorList []error

func (ErrorList) Error

func (err ErrorList) Error() string

type ImportContext

type ImportContext struct {
	Packages map[string]*types.Package
	Import   func(string) (*Archive, error)

func NewImportContext

func NewImportContext(importFunc func(string) (*Archive, error)) *ImportContext

type SourceMapFilter

type SourceMapFilter struct {
	Writer          io.Writer
	MappingCallback func(generatedLine, generatedColumn int, fileSet *token.FileSet, originalPos token.Pos)
	// contains filtered or unexported fields

func (*SourceMapFilter) Write

func (f *SourceMapFilter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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