feat: C backend module import support, Int/Float.toString, Test.assertEqualMsg

The C backend can now compile programs that import user-defined modules.
Module-qualified calls like `mymodule.func(args)` are resolved to prefixed
C functions (e.g., `mymodule_func_lux`), with full support for transitive
imports and effect-passing. Also adds Int.toString/Float.toString to type
system, interpreter, and C backend, and Test.assertEqualMsg for labeled
test assertions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-18 16:35:24 -05:00
parent 2ae2c132e5
commit fffacd2467
5 changed files with 593 additions and 14 deletions

View File

@@ -305,6 +305,11 @@ impl ModuleLoader {
self.cache.iter()
}
/// Get the module cache (for passing to C backend)
pub fn module_cache(&self) -> &HashMap<String, Module> {
&self.cache
}
/// Clear the module cache
pub fn clear_cache(&mut self) {
self.cache.clear();