lc/test_control.l
2026-01-16 20:04:06 +01:00

23 lines
234 B
Text

i32 main()
{
i32 x = 0;
i32 i = 0;
// Test while loop with break
while (i < 10) {
i = i + 1;
if (i == 5) {
break;
}
x = x + i;
}
// Test goto and label
if (x == 10) {
goto skip;
}
x = 999;
skip:
return x;
}