make while loop parsing more elegant

It is now possible to parse parts of the program and save the IR for
later addition. This is currently used for while loops but will also make other
control flow elements easier to implement in the future.
This commit is contained in:
r4
2021-12-22 12:52:16 +01:00
parent a8be4540b1
commit e7f4773cba
4 changed files with 69 additions and 59 deletions

View File

@@ -2,7 +2,7 @@ x := 1
y := 1
i := 60
while i + 1 {
while i {
z := x + y
y = x
x = z