From 4529e0acc377bed4d1bab4230f4023e4bee3ae85 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Mon, 15 Apr 2019 14:35:02 +0100 Subject: Fix: Allow zero-length vector literals --- src/parser.mly | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parser.mly') 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 -- cgit v1.2.3