Syntax error messages involving unclosed parens are sometimes incorrect #5770
Original bug ID: 5770
Parsing invalid patterns inside well-balanced parentheses produces an error message saying that parens don't match.
I provide a patch that fixes the problem by adding a few more error rules in the parser and relevant error messages.
Steps to reproduce
$ echo 'match x with (1 as ) -> 0;;' > /tmp/a.ml
After applying the patch, the new error message is
File "/tmp/a.ml", line 1, characters 19-20:
The text was updated successfully, but these errors were encountered: