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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user