diff --git a/parser/parser.go b/parser/parser.go index 72fd023..66c2109 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -84,6 +84,9 @@ func (p *Parser) ParseFile(abs string, mode parser.Mode) (*ParsedSource, error) } s.Path, err = s.Here.Parse(strings.TrimPrefix(abs, dir)) + if err != nil { + return nil, err + } return p.ParseSource(s, 0) } diff --git a/pkging/pkgutil/stuff.go b/pkging/pkgutil/stuff.go index 0fbf02d..1169a30 100644 --- a/pkging/pkgutil/stuff.go +++ b/pkging/pkgutil/stuff.go @@ -57,5 +57,5 @@ func Stuff(w io.Writer, c here.Info, decls parser.Decls) error { } _, err = w.Write(b) - return nil + return err }