From 2f427f1d9f68cc1f35c9859e24a4a002705e39fd Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 9 Mar 2026 20:44:49 +0100 Subject: Fix file extension --- test.yx | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test.yx (limited to 'test.yx') diff --git a/test.yx b/test.yx new file mode 100644 index 0000000..2e3a515 --- /dev/null +++ b/test.yx @@ -0,0 +1,38 @@ +module foo; + +def puts = $foreign("puts", func(s ^u8)); + +/* +def foo = func() { + let my_string = + \ This is my line + \ this is a second line + \ etc. + ; + puts(my_string); +} +*/ + +/* def add = func(dst *vec($N), v, u vec($N)) + * $poke(operator.addeq) + * { + * loop (i: 0...N) + * dst[i] = v[i] + u[i]; + * }; */ + +def main′ = func() { + puts("Hello, sailor!"); + some_func(#b10.1100'1001e+11); + x, y = 69, 420; + slices_sort(my_slice, func(x, y int) int { + return x - y; + }); +}; + +def r, g, b u8 = 1, 2, 3; + +def some_func = func(n u32) u32 { return n * 2; }; + +/* def MY_FLOAT = union { f f64; n u64; } { n = 0x482DEF }.f */ + +def main = func() { main′(); }; -- cgit v1.2.3