mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-21 16:47:28 +01:00
Add pkg to ast Const and Status nodes
This commit is contained in:
1 parent
33efa88e54
commit
10e4936f08
5 files changed
+73
-46
No files matched your search
+8
-1
@@ -249,6 +249,13 @@ func (h *genHelper) genWuffs(dirname string, qualifiedFilenames []string) error
|
||||
for _, f := range files {
|
||||
for _, n := range f.TopLevelDecls() {
|
||||
switch n.Kind() {
|
||||
case a.KConst:
|
||||
n := n.Const()
|
||||
if !n.Public() {
|
||||
continue
|
||||
}
|
||||
return fmt.Errorf("TODO: genWuffs for consts")
|
||||
|
||||
case a.KFunc:
|
||||
n := n.Func()
|
||||
if !n.Public() {
|
||||
@@ -286,7 +293,7 @@ func (h *genHelper) genWuffs(dirname string, qualifiedFilenames []string) error
|
||||
if !n.Public() {
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(out, "pub %s %s\n", n.Keyword().Str(&h.tm), n.Message().Str(&h.tm))
|
||||
fmt.Fprintf(out, "pub %s %s\n", n.Keyword().Str(&h.tm), n.QID().Str(&h.tm))
|
||||
|
||||
case a.KStruct:
|
||||
n := n.Struct()
|
||||
|
||||
Reference in new issue
Block a user