mclangc/test.mcl

50 lines
840 B
Plaintext
Raw Normal View History

2024-03-14 07:13:01 +00:00
include "std.mcl"
2024-03-23 00:28:20 +00:00
structdef Uwu do
owo do u64 end
twt do u64 end
done
structdef Foo do
buz do u64 end
uwu do Uwu end
done
2024-03-14 07:13:01 +00:00
2024-03-23 00:28:20 +00:00
memory s_foo Foo end
2024-03-14 07:13:01 +00:00
//? 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
2024-03-23 00:28:20 +00:00
fn main with void returns void then
s_foo.uwu.twt 69 write64
s_foo.uwu.twt read64 _dbg_print
// 1 2 add
// 69 _dbg_print
// "Hewo\n" puts
// 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