translator

package
v0.0.0-...-31a528a Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2013 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Prelude = `` /* 18037-byte string literal not displayed */
View Source
var ReservedKeywords = []string{"arguments", "class", "delete", "eval", "export", "false", "function", "implements", "in", "interface", "let", "new", "package", "private", "protected", "public", "static", "this", "true", "try", "with", "yield"}

Functions

func GetAllDependencies

func GetAllDependencies(pkg string, config *types.Config) ([]*types.Package, error)

func ReadArchive

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

TODO replace with encoding/gob when reflection is ready

func TranslatePackage

func TranslatePackage(importPath string, files []*ast.File, fileSet *token.FileSet, config *types.Config) ([]byte, error)

func WriteArchive

func WriteArchive(code []byte, pkg *types.Package, w io.Writer)

func WriteInterfaces

func WriteInterfaces(dependencies []*types.Package, w io.Writer, merge bool)

Types

type DependencyCollector

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

func (*DependencyCollector) Visit

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

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 HasDeferVisitor

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

func (*HasDeferVisitor) Visit

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

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)

Jump to

Keyboard shortcuts

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