Initial Commit

This commit is contained in:
SoraKatadzuma committed 2026-10-28 22:13:49 -05:00
commit 05756094ac
706 files changed
+135430

No files matched your search

@@ -0,0 +1,11 @@
import std::io;
struct serial : attribute { val name: span<u8>; val aliases: span<u8>[2]; }
struct weight : attribute { val value: i64 = 1; }
const def double(x: i64): i64 { return x * 2; }
@serial{ name = "point", aliases = ["p", "pt"] }
struct point { @weight{ value = double(21) } var x: i64; @weight var y: i64; }
enum axis { @weight x, y }
@weight def sum(p: point): i64 { return p.x + p.y; }
def main(): void {
println($"{sum(point{ 3, 4 })} {axis::y as i64}");
}