feat: WIP

This commit is contained in:
2025-08-22 21:40:52 +08:00
parent 3c7722a3d2
commit 65bcfcb47b
9 changed files with 312 additions and 154 deletions

View File

@@ -34,7 +34,7 @@ impl DowngradeCtx<'_, '_> {
impl DowngradeContext for DowngradeCtx<'_, '_> {
fn new_expr(&mut self, expr: Hir) -> ExprId {
self.irs.push(expr.into());
unsafe { ExprId::from_raw(self.ctx.lirs.len() + self.ctx.hirs.len() + self.irs.len() - 1) }
self.ctx.alloc_id()
}
fn with_expr_mut<T>(&mut self, id: ExprId, f: impl FnOnce(&mut Hir, &mut Self) -> T) -> T {