Allow nested loopBlocks

- loopBlocks now contain statements i.o. instructions
This commit is contained in:
2021-12-26 19:23:37 +01:00
committed by Raymon Zutekouw
parent f3a4b8d98f
commit 9c60b4d6ac
+3 -1
View File
@@ -6,10 +6,12 @@ instruction = { operator ~ (" "+ ~ operand)*}
loopBlockStart = { "[" } loopBlockStart = { "[" }
loopBlockEnd = { "]" } loopBlockEnd = { "]" }
loopBlock = { loopBlockStart loopBlock = { loopBlockStart
~ instruction* ~ statements
~ loopBlockEnd ~ loopBlockEnd
} }
statement = _{ instruction | loopBlock } statement = _{ instruction | loopBlock }
statements = _{ statement* }
file = {SOI ~ (statement ~ ("\n" | "\r\n")+)* ~ EOI} file = {SOI ~ (statement ~ ("\n" | "\r\n")+)* ~ EOI}