translator

package
Version: v0.0.0-...-72b3194 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2014 License: MIT, BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Prelude = `` /* 36456-byte string literal not displayed */
View Source
var ReservedKeywords = make(map[string]bool)

Functions

func NewEmptyTypesPackage

func NewEmptyTypesPackage(path string) *types.Package

func WriteArchive

func WriteArchive(o *Output) ([]byte, error)

func WriteInterfaces

func WriteInterfaces(dependencies []string, w io.Writer, merge bool)

Types

type Archive

type Archive struct {
	GcData       []byte
	Dependencies []string
	Code         []byte
}

type ErrorList

type ErrorList []error

func (ErrorList) Error

func (err ErrorList) Error() string

type EscapeAnalysis

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

func (*EscapeAnalysis) Visit

func (v *EscapeAnalysis) Visit(node ast.Node) (w ast.Visitor)

huge overapproximation

type EscapingObjectCollector

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

func (*EscapingObjectCollector) Visit

func (v *EscapingObjectCollector) Visit(node ast.Node) (w ast.Visitor)

type HasBreakVisitor

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

func (*HasBreakVisitor) Visit

func (v *HasBreakVisitor) Visit(node ast.Node) (w ast.Visitor)

type HasCallVisitor

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

func (*HasCallVisitor) Visit

func (v *HasCallVisitor) Visit(node ast.Node) (w ast.Visitor)

type HasDeferVisitor

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

func (*HasDeferVisitor) Visit

func (v *HasDeferVisitor) Visit(node ast.Node) (w ast.Visitor)

type Output

type Output struct {
	Types        *types.Package
	Dependencies []string
	Code         []byte
}

func ReadArchive

func ReadArchive(filename, id string, data []byte) (*Output, error)

func TranslatePackage

func TranslatePackage(importPath string, files []*ast.File, fileSet *token.FileSet, importPkg func(string) (*Output, error)) (*Output, error)

func (*Output) AddDependenciesOf

func (o *Output) AddDependenciesOf(other *Output)

func (*Output) AddDependency

func (o *Output) AddDependency(path string)

type PkgContext

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

func (*PkgContext) CatchOutput

func (c *PkgContext) CatchOutput(f func()) []byte

func (*PkgContext) Delayed

func (c *PkgContext) Delayed(f func())

func (*PkgContext) Indent

func (c *PkgContext) Indent(f func())

func (*PkgContext) Printf

func (c *PkgContext) Printf(format string, values ...interface{})

func (*PkgContext) Write

func (c *PkgContext) Write(b []byte) (int, error)

type VarDependencyCollector

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

func (*VarDependencyCollector) Visit

func (v *VarDependencyCollector) Visit(node ast.Node) (w ast.Visitor)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL