Implemented Basic Parser
This commit is contained in:
16
test/hello.w12
Normal file
16
test/hello.w12
Normal file
@ -0,0 +1,16 @@
|
||||
# Create an enum
|
||||
enum AnimalType {
|
||||
Dog,
|
||||
Cat,
|
||||
}
|
||||
# Create a struct
|
||||
struct Pet {
|
||||
name: [char], # A list of characters
|
||||
age: uint, # An unsigned 32-bit integer
|
||||
type: AnimalType,
|
||||
living: bool,
|
||||
}
|
||||
# Create a function that can be called on a Pet
|
||||
fn on Pet rename(newName: [char]) {
|
||||
return "test";
|
||||
}
|
Reference in New Issue
Block a user