aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/qparser/expression_parser.messages4
-rw-r--r--test/syntax_error.ml7
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/qparser/expression_parser.messages b/lib/qparser/expression_parser.messages
index 707597b..264e37d 100644
--- a/lib/qparser/expression_parser.messages
+++ b/lib/qparser/expression_parser.messages
@@ -103,3 +103,7 @@ main: LOCATION_START EOL IF IDENT COLUMN EOL END TEXT_MARKER
main: LOCATION_START EOL ACT IDENT COLUMN EOL END TEXT_MARKER
Unexpected instruction after `ACT` `END` block.
+
+main: LOCATION_START EOL FUNCTION L_PAREN IDENT COMA IDENT EOL
+
+ Unclosed `(`
diff --git a/test/syntax_error.ml b/test/syntax_error.ml
index 490ec96..66f442d 100644
--- a/test/syntax_error.ml
+++ b/test/syntax_error.ml
@@ -228,6 +228,12 @@ end if|}
(* The location name *)
+let unclosed_paren2 () =
+ _test_instruction {|
+iif(1,0,0 + iif(1, 1, 2)
+|}
+ { level = Error; loc = _position; message = "Unclosed `(`" }
+
let test =
( "Syntax Errors",
[
@@ -246,4 +252,5 @@ let test =
Alcotest.test_case "Missing comparable" `Quick missing_comparable;
Alcotest.test_case "Location change" `Quick location_change;
Alcotest.test_case "Misplaced if" `Quick misplaced_if;
+ Alcotest.test_case "(()" `Quick unclosed_paren2;
] )