Allow either spaces or tabs as spacing

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

@ -1,7 +1,7 @@
operator = @{ "operator" } // TODO
operand = @{ "operand" } // TODO
instruction = { operator ~ (" "+ ~ operand)? }
instruction = { operator ~ (spacing+ ~ operand)? }
loopBlockStart = { "[" ~ newline }
loopBlockEnd = { "]" }
@ -15,5 +15,6 @@ statement = _{ instruction | loopBlock }
statements = _{ statement* }
newline = _{ "\n" | "\r\n" }
spacing = _{ " " | "\t" }
file = {SOI ~ (statement ~ newline+)* ~ EOI}

Loading…
Cancel
Save