29 lines
415 B
Plaintext
29 lines
415 B
Plaintext
module main
|
|
|
|
struct Human {
|
|
name: string
|
|
age: i32
|
|
}
|
|
|
|
enum Message {
|
|
Quit
|
|
Say: string
|
|
}
|
|
|
|
func main(): i32 {
|
|
core::println("Hello, world!")
|
|
core::println("Hello" + "World")
|
|
|
|
let message: Message = new Message::Say "test"
|
|
|
|
match message {
|
|
Quit {
|
|
core::println("quit")
|
|
}
|
|
Say message {
|
|
core::println(message)
|
|
}
|
|
}
|
|
|
|
return 0
|
|
} |