use crate::parser::Type; struct RegAlloc { pub regs: Box<[Option; 256]>, } struct Variable { name: String, location: usize, } enum Symbol { Type(String, Type), Func(String, Vec, Type), } struct Slot { ty: Type, value: Value, } enum Value { Reg(u8), Stack(i32), Imm(u64), } type Label = usize; pub struct Generator { regs: RegAlloc, symbols: Vec, variables: Vec, slots: Vec, relocations: Vec<(Label, usize)>, } impl Generator { pub fn gen(); }