From f11698df16baf9d896fd15e698a7a1f9aa5a0384 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Fri, 15 May 2020 22:27:06 -0400 Subject: [PATCH] Do not require a newline before line statements As we discovered in the tests, the logic for line statements only enforces that when they are found, the remaining portion of the line is treated as a statement declaration. This means that a line statement can follow things such as text, which the grammar did not previously allow. The grammar also did not allow a line statement to be the first line in a file, wich this change also now supports. All non-newline whitespace preceding the line statement will continue to be stripped. --- grammar.ebnf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammar.ebnf b/grammar.ebnf index 039d57fb..d68dbb20 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -115,7 +115,7 @@ line_block_end line_block_open = - "\n" {SP}* line_block_open_symbol {SP}* + { !"\n" SP }* line_block_open_symbol { !"\n" SP }* ; line_block_open_symbol -- 2.47.3