This commit is contained in:
nub31
2025-07-03 18:57:37 +02:00
parent 8889f984d6
commit 66d47b9100
2 changed files with 57 additions and 28 deletions

View File

@@ -1,29 +1,31 @@
namespace main
struct Name {
first: cstring
last: cstring
}
// struct Name {
// first: cstring
// last: cstring
// }
struct Human
{
name: Name
age: i64
}
// struct Human
// {
// name: Name
// age: i64
// }
export func main(args: []cstring): i64
{
let x: Human
// let x: Human
x = alloc Human {
name = alloc Name {
first = "john"
last = "doe"
}
age = 23
}
// x = alloc Human {
// name = alloc Name {
// first = "john"
// last = "doe"
// }
// age = 23
// }
c::puts(x.name.last)
// c::puts(x.name.last)
c::puts("test")
return 0
}