mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
4ca2d3f0cf
This commit replaces the existing ad-hoc package loader with a package loader that uses the x/tools/go/packages package to find all to-be-loaded packages.
13 lines
255 B
Go
13 lines
255 B
Go
package loader
|
|
|
|
// Errors contains a list of parser errors or a list of typechecker errors for
|
|
// the given package.
|
|
type Errors struct {
|
|
Pkg *Package
|
|
Errs []error
|
|
}
|
|
|
|
func (e Errors) Error() string {
|
|
return "could not compile: " + e.Errs[0].Error()
|
|
}
|