...
This commit is contained in:
43
example/main.nub
Normal file
43
example/main.nub
Normal file
@@ -0,0 +1,43 @@
|
||||
namespace main
|
||||
|
||||
struct Human {
|
||||
age: u64
|
||||
print_age: func() = func() {
|
||||
c::puts("pwp")
|
||||
}
|
||||
}
|
||||
|
||||
export func main(args: []^string): i64 {
|
||||
let x = 2
|
||||
|
||||
let uwu = func() {
|
||||
c::puts("uwu")
|
||||
}
|
||||
|
||||
uwu()
|
||||
|
||||
func() {
|
||||
c::puts("owo")
|
||||
}()
|
||||
|
||||
let me = alloc Human {
|
||||
age = 23
|
||||
}
|
||||
|
||||
me.print_age()
|
||||
|
||||
if true {
|
||||
// do something
|
||||
}
|
||||
|
||||
c::puts("test")
|
||||
|
||||
let i = 1
|
||||
while i <= 10 {
|
||||
c::puts("test")
|
||||
i = i + 1
|
||||
}
|
||||
|
||||
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user