diff options
-rw-r--r-- | lib/qparser/expression_parser.messages | 2 | ||||
-rw-r--r-- | test/syntax_error.ml | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/qparser/expression_parser.messages b/lib/qparser/expression_parser.messages index 23d0dc3..e15c3fd 100644 --- a/lib/qparser/expression_parser.messages +++ b/lib/qparser/expression_parser.messages @@ -281,6 +281,8 @@ Unexpected operator after `ELSE` main: LOCATION_START EOL IDENT DECR INTEGER SET main: LOCATION_START EOL SET IDENT DECR INTEGER SET main: LOCATION_START EOL LET IDENT DECR INTEGER SET +main: LOCATION_START EOL KEYWORD INTEGER TEXT_MARKER +main: LOCATION_START EOL KEYWORD IDENT COMA INTEGER TEXT_MARKER Missing separator between instructions diff --git a/test/syntax_error.ml b/test/syntax_error.ml index 08de384..d814cbe 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -158,6 +158,17 @@ ELSEIF 0: instruction."; } +let comment_as_operator () = + let result = + { + level = Error; + loc = _position; + message = "Missing separator between instructions"; + } + in + _test_instruction "gs 'a', 'b' ! target" result; + _test_instruction "gs 'a' ! target" result + let test = ( "Syntax Errors", [ @@ -172,4 +183,5 @@ let test = Alcotest.test_case "Unknown function" `Quick unknow_function; Alcotest.test_case "Inline elif" `Quick inline_elif; Alcotest.test_case "Unclosed block" `Quick unclosed_block; + Alcotest.test_case "Unclosed block" `Quick comment_as_operator; ] ) |