implemented labels and goto parsing

This commit is contained in:
Lorenzo Torres 2025-12-01 21:05:06 +01:00
parent 1be3bf0659
commit 1ca6f024ee
7 changed files with 71 additions and 17 deletions

21
examples/for.l Normal file
View file

@ -0,0 +1,21 @@
import std::io;
i32 main()
{
[u32] list = [1, 2, 3, 4, 5];
// iterative loop
loop (0.., list) |i, v| {
printf("%d\n", i);
}
// conditional loop
loop a == 3 {
}
// infinite loop
loop {
}
}