prepare for modules

This commit is contained in:
2025-04-25 04:16:54 -04:00
parent 0ceb82445e
commit 4e7c201690
30 changed files with 369 additions and 333 deletions
+4 -7
View File
@@ -1,4 +1,4 @@
use std::collections::{HashMap, HashSet};
use std::collections::HashMap;
use super::{GenericID, Len, StructID, UInstruction, UProgram, UVar, VarID};
@@ -80,7 +80,7 @@ impl UProgram {
pub fn resolve_instr_types(
&self,
vars: &mut Vec<Option<UVar>>,
vars: &mut [Option<UVar>],
i: &UInstruction,
) -> Result<(), VarID> {
'outer: {
@@ -161,13 +161,10 @@ impl UProgram {
args[i] = ty;
}
}
// for arg in &args {
// println!("{:?}", self.type_name(arg));
// }
set(vars, dest.id, Type::Struct { id, args });
}
UInstruction::If { cond, body } => {}
UInstruction::Loop { body } => {}
UInstruction::If { cond, body: _ } => {}
UInstruction::Loop { body: _ } => {}
UInstruction::Break => {}
UInstruction::Continue => {}
}