Allow extra newlines between statements

rewrite/grammar-implicit-whitespace
Raymon Zutekouw 3 years ago
parent 84ba80e38a
commit 535f362910
No known key found for this signature in database
GPG Key ID: 1E9BCC39EDD1DD53
  1. 3
      src/grammars/mblf.pest

@ -7,7 +7,6 @@ loopBlockStart = { "[" ~ newline }
loopBlockEnd = { "]" } loopBlockEnd = { "]" }
loopBlock = { loopBlockStart loopBlock = { loopBlockStart
~ statements ~ statements
~ newline
~ loopBlockEnd ~ loopBlockEnd
} }
@ -15,7 +14,7 @@ statement = _{ spacing*
~ (instruction | loopBlock) ~ (instruction | loopBlock)
} }
statements = _{ statement* } statements = _{ (statement | newline)* }
newline = _{ "\n" | "\r\n" } newline = _{ "\n" | "\r\n" }
spacing = _{ " " | "\t" } spacing = _{ " " | "\t" }

Loading…
Cancel
Save