mclangc/test.mcl

40 lines
693 B
Plaintext
Raw Normal View History

2024-03-14 07:13:01 +00:00
include "std.mcl"
// structdef Foo do
// buz do sizeof(u64) end
// baz do sizeof(u64) end
// done
// memory s_foo Foo end
//? Comments :3
// extern fn a with void returns void then done
// inline fn b with void returns void then done
// export fn c with void returns void then done
// fn putd with int returns void then drop done
fn main with int ptr returns int then
2024-03-14 08:10:25 +00:00
1 2 add
69 _dbg_print
2024-03-14 07:13:01 +00:00
"Hewo\n" puts
2024-03-14 08:10:25 +00:00
if 3 4 eq do
"omg what impossible!\n"
else if 1 1 eq do
"whaaaaaaaaa\n"
else
"finally, some good soup\n"
done
puts
10
while dup 0 gt do
"uwu " puts
dup _dbg_print
1 sub
done
2024-03-14 07:13:01 +00:00
done