mirror of https://github.com/tinygo-org/tinygo.git
wasmstm32webassemblymicrocontrollerarmavrspiwasiadafruitarduinocircuitplayground-expressgpioi2cllvmmicrobitnrf51nrf52nrf52840samd21tinygo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
746 B
35 lines
746 B
package loader
|
|
|
|
import "go/scanner"
|
|
|
|
// 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()
|
|
}
|
|
|
|
// Error is a regular error but with an added import stack. This is especially
|
|
// useful for debugging import cycle errors.
|
|
type Error struct {
|
|
ImportStack []string
|
|
Err scanner.Error
|
|
}
|
|
|
|
func (e Error) Error() string {
|
|
return e.Err.Error()
|
|
}
|
|
|
|
// Error returned when loading a *Program for a test binary but no test files
|
|
// are present.
|
|
type NoTestFilesError struct {
|
|
ImportPath string
|
|
}
|
|
|
|
func (e NoTestFilesError) Error() string {
|
|
return "no test files"
|
|
}
|
|
|