summary refs log tree commit diff
path: root/src/parse.janet
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.janet')
-rw-r--r--src/parse.janet8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/parse.janet b/src/parse.janet
index bb329b5..4b08d30 100644
--- a/src/parse.janet
+++ b/src/parse.janet
@@ -285,7 +285,8 @@
         :expr/container (/ (* (+ :keyword/extern :keyword/packed 0)
                               (constant :kind)
                               (+ (* (constant :struct) :keyword/struct
-                                    (? (* :paren/l :expr :paren/r)))
+                                    (? (* :paren/l (constant :backing)
+                                          :expr :paren/r)))
                                  (* (constant :opaque) :keyword/opaque)
                                  :proto/enum
                                  (* (constant :union) :keyword/union
@@ -412,8 +413,9 @@
                            (/ (+ :decl/test
                                  :decl/comptime
                                  (* (? :doc-comment)
-                                    (? (* (constant :pub) (constant true)
-                                          (drop :keyword/pub)))
+                                    (constant :pub?)
+                                    (+ (* (constant true) :keyword/pub)
+                                       (* (constant false) 0))
                                     (constant :kind)
                                     (+ (* (constant :fn) :decl/fn)
                                        (* (constant :global) :decl/global)