diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2024-04-08 14:48:10 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2024-04-08 14:48:10 +0900 |
commit | a09c80643e0d100ddfe2c935b527b41f108338da (patch) | |
tree | 55e9e133465497af3ece1fb2089c0b3c712a59e9 /src | |
parent | 3cfda858dcdd50743593aa28527d21603748d859 (diff) | |
download | quy-a09c80643e0d100ddfe2c935b527b41f108338da.tar.gz |
Diffstat (limited to 'src')
-rw-r--r-- | src/parse.janet | 8 |
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) |