37 lines
502 B
Text
37 lines
502 B
Text
// import std;
|
|
|
|
struct B {
|
|
field i32
|
|
}
|
|
|
|
struct Awoo {
|
|
b B
|
|
other_field i32
|
|
}
|
|
|
|
fn test_function() Awoo {
|
|
return 1;
|
|
}
|
|
|
|
fn multwo(num: i32, double_flag: bool) i32 {
|
|
// TODO resolve expr variables
|
|
if (true) {
|
|
return 1 * 2;
|
|
} else {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
fn add(a: i32, b: i32) i32 {
|
|
return 69 + 69;
|
|
}
|
|
|
|
fn and_fn() bool {
|
|
return true and false;
|
|
}
|
|
|
|
// type is void by default
|
|
//fn main() {
|
|
// print("piss\n");
|
|
// // print("2 + 2 = %d\n", add(1, 2));
|
|
//}
|