This repository has been archived on 2025-10-24. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nub-lang-archive-2/example/main.nub
2025-06-21 18:16:25 +02:00

40 lines
457 B
Plaintext

namespace main
struct Human {
name: cstring
}
export func main(args: []cstring): i64 {
let human: Human
human = alloc Human {
name = "member"
}
c::puts(human.name)
c::puts("literal")
let x: cstring
x = "variable"
c::puts(x)
let y: func(cstring)
y = c::puts
y("proxy")
func(){ c::puts("anon") }()
let z: func()
z = func() { c::puts("anon variable") }
z()
return 0
}