allow single statement loops

This commit is contained in:
dfsek
2020-12-27 20:52:35 -07:00
parent 283495832f
commit 7cf34dbd8a
2 changed files with 55 additions and 41 deletions

View File

@@ -17,6 +17,9 @@ for(num i = 0; i < 5; i = i + 1) {
test("i = " + i, iterator);
}
for(num j = 0; j < 5; j = j + 1) test("single statement j = " + j, iterator);
while(iterator < 5) {
test("always, even after " + 2, iterator);
@@ -27,6 +30,9 @@ while(iterator < 5) {
test("not after " + 2, iterator);
}
if(true) test("single statement" + 2, iterator);
else if(true) test("another single statement" + 2, iterator);
if(true) {
test("true!" + 2, iterator);
} else {