summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
authorAlasdair Armstrong2019-04-15 14:35:02 +0100
committerAlasdair Armstrong2019-04-15 14:35:02 +0100
commit4529e0acc377bed4d1bab4230f4023e4bee3ae85 (patch)
tree76f6e8666c2cf12e2eeb95719162362a1b255e31 /src/parser.mly
parent1f421b865a87a161a82550443a0cf39aa2642d9c (diff)
Fix: Allow zero-length vector literals
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.mly b/src/parser.mly
index 5e448a05..8c4475c4 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -1064,6 +1064,8 @@ atomic_exp:
{ mk_exp (E_record $3) $startpos $endpos }
| Lcurly exp With fexp_exp_list Rcurly
{ mk_exp (E_record_update ($2, $4)) $startpos $endpos }
+ | Lsquare Rsquare
+ { mk_exp (E_vector []) $startpos $endpos }
| Lsquare exp_list Rsquare
{ mk_exp (E_vector $2) $startpos $endpos }
| Lsquare exp With atomic_exp Eq exp Rsquare