Browse Source

[parser] that's still not quite it

Simon Krajewski 6 years ago
parent
commit
572ac0f64b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/syntax/grammar.mly

+ 2 - 1
src/syntax/grammar.mly

@@ -1412,7 +1412,8 @@ and parse_call_params f p1 s =
 				expr s
 			with
 			| Stream.Failure ->
-				syntax_error (Expected ["expression";")"]) s ();
+				let expected = "expression" :: (if acc = [] then [")"] else []) in
+				syntax_error (Expected expected) s ();
 				mk_null_expr (punion_next p1 s)
 			| Stream.Error msg ->
 				syntax_error (StreamError msg) s ();