2019-09-20 16:16:55 +00:00
|
|
|
// import std;
|
2019-09-18 14:37:08 +00:00
|
|
|
|
2019-09-25 14:29:47 +00:00
|
|
|
enum B {
|
|
|
|
a
|
|
|
|
b
|
|
|
|
c
|
2019-09-25 03:26:30 +00:00
|
|
|
}
|
|
|
|
|
2019-09-25 14:29:47 +00:00
|
|
|
fn test_function() B {
|
|
|
|
return B.a;
|
2019-09-25 03:26:30 +00:00
|
|
|
}
|
|
|
|
|
2019-09-24 17:12:37 +00:00
|
|
|
fn multwo(num: i32, double_flag: bool) i32 {
|
|
|
|
// TODO resolve expr variables
|
|
|
|
if (true) {
|
|
|
|
return 1 * 2;
|
|
|
|
} else {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-24 16:32:00 +00:00
|
|
|
fn add(a: i32, b: i32) i32 {
|
2019-09-24 16:23:23 +00:00
|
|
|
return 69 + 69;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn and_fn() bool {
|
|
|
|
return true and false;
|
2019-09-18 14:37:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// type is void by default
|
2019-09-21 02:40:21 +00:00
|
|
|
//fn main() {
|
|
|
|
// print("piss\n");
|
|
|
|
// // print("2 + 2 = %d\n", add(1, 2));
|
|
|
|
//}
|