[WIP] Support nested statements
Created by: nounoursheureux
Currently there is no way to make an if
inside another if
, because the end
instruction resets the current statement. To solve this problem I use a stack of Statement
s: an if
pushes a Statement
to the stack and an end
pops it. For now it doesn't work for the for
blocks, because they only interpret their content when they encounter an end
instruction, but I am working on it. Let me know if you agree with the approach I took so far !
Goals:
-
if
insideif
-
if
insidefor
-
for
insidefor
...