Implemented for loops

This commit is contained in:
2025-02-19 23:46:17 +01:00
parent 7922cff7ba
commit 45a36a645a
16 changed files with 142 additions and 120 deletions

14
tests/programs/loop-for.q Normal file
View File

@ -0,0 +1,14 @@
main() {
x := 0
for 0..5 {
x += 1
}
assert x == 5
for i := 0..5 {
assert i >= 0
assert i < 5
}
}