fixed compound node

This commit is contained in:
Lorenzo Torres 2025-12-03 22:17:55 +01:00
parent df1b336c7c
commit 21b43af69d
7 changed files with 117 additions and 102 deletions

View file

@ -1,21 +1,15 @@
import std::io;
import std;
i32 main()
{
[u32] list = [1, 2, 3, 4, 5];
// iterative loop
loop (0.., list) |i, v| {
printf("%d\n", i);
u32 x = 4;
loop x == 3 {
u32 b = 3;
}
// conditional loop
loop a == 3 {
loop (0.., test) |k, i| {
}
u32 b = 3;
// infinite loop
loop {
}
}

View file

@ -1,4 +0,0 @@
u32 sum<T>(T x, T y)
{
return x + y;
}

View file

@ -1,6 +1,8 @@
import test;
import std;
i32 main()
{
print_msg("Hello world!");
print("Hello world!\n");
return 0;
}

View file

@ -1,10 +0,0 @@
import std::io;
module log {
void print_msg([u8] msg)
{
printf("%s\n", msg);
}
}