for in syntax

This commit is contained in:
nub31
2025-10-22 18:32:45 +02:00
parent 420c990731
commit 1fb88f2073
8 changed files with 172 additions and 25 deletions

View File

@@ -2,9 +2,19 @@ module "main"
extern "puts" func puts(text: cstring)
struct Test
{
data: [23]cstring
}
extern "main" func main(argc: i64, argv: [?]cstring): i64
{
defer puts("Bye cruel world!")
puts("Hello world!")
let names = struct Test {}
for name, i in names.data
{
puts(name)
}
return 0
}