summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2024-04-08 14:48:10 +0900
committerNguyễn Gia Phong <cnx@loang.net>2024-04-08 14:48:10 +0900
commita09c80643e0d100ddfe2c935b527b41f108338da (patch)
tree55e9e133465497af3ece1fb2089c0b3c712a59e9 /src
parent3cfda858dcdd50743593aa28527d21603748d859 (diff)
downloadquy-a09c80643e0d100ddfe2c935b527b41f108338da.tar.gz
Pass parsing spec/grammar/tests/packed_struct_arg.zig HEAD main
Diffstat (limited to 'src')
-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)