Generate inline headers for use declarations

This commit is contained in:
Nigel Tao committed 2017-12-02 14:54:58 +11:00
1 parent c5b5efd7c8
commit 9867cd5e3a
6 files changed
+549 -16

No files matched your search

+3 -1
View File
@@ -27,6 +27,8 @@ import (
"github.com/google/wuffs/lang/generate"
cf "github.com/google/wuffs/cmd/commonflags"
a "github.com/google/wuffs/lang/ast"
t "github.com/google/wuffs/lang/token"
)
@@ -89,7 +91,7 @@ func (h *genHelper) gen(dirname string, recursive bool) error {
}
h.seen[dirname] = struct{}{}
if dirname != path.Clean(dirname) || dirname == "" || dirname[0] == '.' || dirname[0] == '/' {
if !cf.IsValidUsePath(dirname) {
return fmt.Errorf("invalid package path %q", dirname)
}