Skip to content

[WIP] Support nested statements

Michael Aaron Murphy requested to merge nounoursheureux:if-end into master

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 Statements: 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 inside if
  • if inside for
  • for inside for ...

Merge request reports