mclangc/test.mcl
2026-01-28 22:30:02 +02:00

48 lines
652 B
Plaintext

type str = [u8];
struct Foo {
a: usize,
b: &str
}
fn Foo.new(a: usize, b: &str) -> &Foo {
return &Foo {
a: a,
b: b
};
}
fn print(s: &str) {
// do nothign for now
}
fn mul(n: usize, n2: usize) -> usize {
return n * n2;
}
fn main() -> i32 {
let obj = Foo::new(1, "owo");
obj->b;
let owo = "ahahaha";
loop {
print(owo);
}
for (let i = 0; i < 10; i += 1) {
print("nyaaa");
if (i > 7) {
break;
} else {
continue;
}
print("cant see me!");
}
while (true) {
mul(1);
}
}
const FOO: usize = main;