summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2024-04-05 15:17:13 +0900
committerNguyễn Gia Phong <cnx@loang.net>2024-04-05 15:17:13 +0900
commitf5382344577fd053e004a4ba25a0d4cb232fb19d (patch)
treed006b10c76055976af3a7b609affdec019ec301d /src
parentb9adad5f4179c8556f585dc0b9e9f31b665ba776 (diff)
downloadquy-f5382344577fd053e004a4ba25a0d4cb232fb19d.tar.gz
Pass parsing spec/grammar/tests/float_literals.zig
Diffstat (limited to 'src')
-rw-r--r--src/parse.janet9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/parse.janet b/src/parse.janet
index 9b08690..58e8f79 100644
--- a/src/parse.janet
+++ b/src/parse.janet
@@ -221,7 +221,10 @@
                                   :keyword/const
                                   :keyword/volatile
                                   :keyword/allowzero)))
-        :proto/array (* :bracket/l :expr (? (* :: :expr)) :bracket/r)
+        :proto/array (* (constant :kind) (constant :array)
+                        :bracket/l (constant :len) :expr
+                        (? (* (constant :sentinel) :: :expr))
+                        :bracket/r (constant :child))
         :proto/type (+ :? (* :keyword/anyframe :->)
                        :proto/slice :proto/pointer :proto/array)
         :proto/decl-var (* (constant :const?)
@@ -344,7 +347,9 @@
                                  (* :proto/while :expr
                                     (? (* :keyword/else (? :payload) :expr)))))
                            :block
-                           (* :expr/type :list/init)
+                           (/ (* :expr/type
+                                 (constant :init) (/ :list/init ,tuple))
+                              ,struct)
                            :expr/type/primary))
         :expr/mul (* :expr/prefix
                      (any (* (+ ,(keyword "||") :**