From 8a02bbbd2bf42e2152faca16b95152744ef416d0 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Sat, 20 Jan 2024 21:59:10 +0100 Subject: Reject a syntax which was incorrectly accepted --- lib/qparser/expression_parser.messages | 8 ++++++++ lib/qparser/parser.mly | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/qparser') diff --git a/lib/qparser/expression_parser.messages b/lib/qparser/expression_parser.messages index 5345ebf..707597b 100644 --- a/lib/qparser/expression_parser.messages +++ b/lib/qparser/expression_parser.messages @@ -95,3 +95,11 @@ main: LOCATION_START EOL IDENT GT EQUAL STAR main: LOCATION_START EOL IDENT LT EQUAL STAR Missing boolean after operator + +main: LOCATION_START EOL IF IDENT COLUMN EOL END TEXT_MARKER + + Unexpected instruction after `IF` `END` block. + +main: LOCATION_START EOL ACT IDENT COLUMN EOL END TEXT_MARKER + + Unexpected instruction after `ACT` `END` block. diff --git a/lib/qparser/parser.mly b/lib/qparser/parser.mly index 6fc9b8f..861d8b9 100644 --- a/lib/qparser/parser.mly +++ b/lib/qparser/parser.mly @@ -78,7 +78,7 @@ line_statement: COLUMN EOL+ s = line_statement* b = BODY - END TOKEN? + END line_sep { let expression = Analyzer.Expression.v e in -- cgit v1.2.3