diff --git a/reid/src/mir/linker.rs b/reid/src/mir/linker.rs index 530faca..e8b66af 100644 --- a/reid/src/mir/linker.rs +++ b/reid/src/mir/linker.rs @@ -103,10 +103,10 @@ impl<'map> Pass for LinkerPass<'map> { modules.insert(module.name.clone(), Rc::new(RefCell::new((module, tokens)))); } - // modules.insert( - // "std".to_owned(), - // Rc::new(RefCell::new(compile_std(&mut self.module_map)?)), - // ); + modules.insert( + "std".to_owned(), + Rc::new(RefCell::new(compile_std(&mut self.module_map)?)), + ); let mut modules_to_process: Vec)>>> = modules.values().cloned().collect(); diff --git a/reid/tests/e2e.rs b/reid/tests/e2e.rs index 465a6d7..814bab8 100644 --- a/reid/tests/e2e.rs +++ b/reid/tests/e2e.rs @@ -26,9 +26,10 @@ pub static FIBONACCI: &str = include_str!("../../reid_src/fibonacci.reid"); pub static HELLO_WORLD: &str = include_str!("../../reid_src/hello_world.reid"); pub static MUTABLE: &str = include_str!("../../reid_src/mutable.reid"); pub static STRINGS: &str = include_str!("../../reid_src/strings.reid"); -pub static ARRAYS: &str = include_str!("../../reid_src/array.reid"); pub static STRUCTS: &str = include_str!("../../reid_src/struct.reid"); pub static ARRAY_STRUCTS: &str = include_str!("../../reid_src/array_structs.reid"); +pub static BORROW: &str = include_str!("../../reid_src/borrow.reid"); +pub static ARITHMETIC: &str = include_str!("../../reid_src/arithmetic.reid"); #[test] fn array_compiles_well() { @@ -69,3 +70,13 @@ fn struct_compiles_well() { fn array_structs_compiles_well() { test(ARRAY_STRUCTS, "array_structs"); } + +#[test] +fn borrow_structs_compiles_well() { + test(BORROW, "borrow"); +} + +#[test] +fn arithmetic_structs_compiles_well() { + test(ARITHMETIC, "arithmetic"); +}