diff options
author | Ayke van Laethem <[email protected]> | 2018-11-25 17:37:31 +0100 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2018-12-10 15:36:23 +0100 |
commit | e10d05c74fca049207a89939581cea1087457423 (patch) | |
tree | 1cbd43453456fa8dbfd6fd21ddedc07805149220 /main.go | |
parent | 564b1b3312b02a0b664b3cf55320236e1227bd82 (diff) | |
download | tinygo-e10d05c74fca049207a89939581cea1087457423.tar.gz tinygo-e10d05c74fca049207a89939581cea1087457423.zip |
loader: switch to custom program loader
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) } |