From 8b62a51a6428f99d9a0ee69fb8889d8017af36a7 Mon Sep 17 00:00:00 2001 From: Raymon Zutekouw 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}