dir import

This commit is contained in:
agra
2026-02-20 12:27:06 +02:00
parent 1ecac79642
commit 5956303366
5 changed files with 139 additions and 28 deletions

View File

@@ -1,4 +1,5 @@
#import "modules/std.sx";
pkg :: #import "modules/testpkg";
// ============================================================
// Comprehensive Smoke Test — exercises every spec feature
@@ -1351,5 +1352,13 @@ END;
print("{}\n", 5 in (1, 2, 3)); // false
}
// --- Directory imports ---
{
print("--- directory imports ---\n");
print("{}\n", pkg.add(3, 4)); // 7
print("{}\n", pkg.mul(5, 6)); // 30
print("{}\n", pkg.hello()); // hello from testpkg
}
print("=== DONE ===\n");
}

View File

@@ -0,0 +1 @@
hello :: () -> string { "hello from testpkg"; }

View File

@@ -0,0 +1,2 @@
add :: (a: s32, b: s32) -> s32 { a + b; }
mul :: (a: s32, b: s32) -> s32 { a * b; }