From c7a55c7a2a4958418d9df5aadf05c59cc19fbdb6 Mon Sep 17 00:00:00 2001 From: Raymon Zutekouw <40148684+Raymonzut@users.noreply.github.com> Date: Sun, 26 Dec 2021 19:47:40 +0100 Subject: [PATCH] Allow either spaces or tabs as spacing --- src/grammars/mblf.pest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grammars/mblf.pest b/src/grammars/mblf.pest index 6c4caec..3265928 100644 --- a/src/grammars/mblf.pest +++ b/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}