summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--parsing/parser.mly2
1 files changed, 2 insertions, 0 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly
index 8f4cd3575..6973c3407 100644
--- a/parsing/parser.mly
+++ b/parsing/parser.mly
@@ -389,6 +389,8 @@ expr:
{ mkexp(Pexp_ifthenelse($2, $4, None)) }
| expr SEMI expr
{ mkexp(Pexp_sequence($1, $3)) }
+ | expr SEMI
+ { mkexp(Pexp_sequence($1, mkexp(Pexp_construct(Lident "()", None)))) }
| WHILE expr DO expr DONE
{ mkexp(Pexp_while($2, $4)) }
| FOR val_ident EQUAL expr direction_flag expr DO expr DONE