diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/parse.janet | 9 |
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 "||") :** |