Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCachedGoroot ¶ added in v0.14.0
func GetCachedGoroot(config *compileopts.Config) (string, error)
GetCachedGoroot creates a new GOROOT by merging both the standard GOROOT and the GOROOT from TinyGo using lots of symbolic links.
Types ¶
type Errors ¶
Errors contains a list of parser errors or a list of typechecker errors for the given package.
type Package ¶
Package holds a loaded package, its imports, and its parsed files.
func (*Package) Check ¶
Check runs the package through the typechecker. The package must already be loaded and all dependencies must have been checked already.
Idempotent.
type Program ¶
type Program struct {
Build *build.Context
Tests bool
Packages map[string]*Package
MainPkg *Package
TypeChecker types.Config
Dir string // current working directory (for error reporting)
TINYGOROOT string // root of the TinyGo installation or root of the source code
CFlags []string
LDFlags []string
ClangHeaders string
// contains filtered or unexported fields
}
Program holds all packages and some metadata about the program as a whole.
func (*Program) Load ¶ added in v0.14.0
Load loads the given package with all dependencies (including the runtime package). Call .Parse() afterwards to parse all Go files (including CGo processing, if necessary).
func (*Program) LoadSSA ¶
LoadSSA constructs the SSA form of the loaded packages.
The program must already be parsed and type-checked with the .Parse() method.