aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2018-11-25 17:37:31 +0100
committerAyke van Laethem <[email protected]>2018-12-10 15:36:23 +0100
commite10d05c74fca049207a89939581cea1087457423 (patch)
tree1cbd43453456fa8dbfd6fd21ddedc07805149220 /main.go
parent564b1b3312b02a0b664b3cf55320236e1227bd82 (diff)
downloadtinygo-e10d05c74fca049207a89939581cea1087457423.tar.gz
tinygo-e10d05c74fca049207a89939581cea1087457423.zip
loader: switch to custom program loader
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.go b/main.go
index 8e8fc43ee..77c76fb37 100644
--- a/main.go
+++ b/main.go
@@ -18,6 +18,7 @@ import (
"github.com/aykevl/go-llvm"
"github.com/aykevl/tinygo/compiler"
"github.com/aykevl/tinygo/interp"
+ "github.com/aykevl/tinygo/loader"
)
var commands = map[string]string{
@@ -454,6 +455,11 @@ func handleCompilerError(err error) {
fmt.Fprintln(os.Stderr)
} else if errCompiler, ok := err.(types.Error); ok {
fmt.Fprintln(os.Stderr, errCompiler)
+ } else if errLoader, ok := err.(loader.Errors); ok {
+ fmt.Fprintln(os.Stderr, "#", errLoader.Pkg.ImportPath)
+ for _, err := range errLoader.Errs {
+ fmt.Fprintln(os.Stderr, err)
+ }
} else {
fmt.Fprintln(os.Stderr, "error:", err)
}