@@ -1,7 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
compile::Ctx,
|
compile::Ctx,
|
||||||
obj::Sym,
|
obj::Sym,
|
||||||
syn::{ast, span::*},
|
syn::span::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub type Body = Vec<Stmt>;
|
pub type Body = Vec<Stmt>;
|
||||||
|
|||||||
@@ -4,10 +4,7 @@ pub mod ir;
|
|||||||
pub mod name;
|
pub mod name;
|
||||||
pub mod visit;
|
pub mod visit;
|
||||||
|
|
||||||
use crate::{
|
use crate::compile::name::NameStack;
|
||||||
syn::ast::Stmt,
|
|
||||||
compile::name::NameStack,
|
|
||||||
};
|
|
||||||
|
|
||||||
// * Desugar
|
// * Desugar
|
||||||
// * Collect names as symbols
|
// * Collect names as symbols
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ impl Visit for CollectNames<'_, '_> {
|
|||||||
self.visit_expr(&i.expr);
|
self.visit_expr(&i.expr);
|
||||||
self.visit_expr(&i.index);
|
self.visit_expr(&i.index);
|
||||||
}
|
}
|
||||||
Expr::Fun(f) => { /* no-op */ }
|
Expr::Fun(_) => { /* no-op */ }
|
||||||
Expr::Base(b) => self.visit_base_expr(b),
|
Expr::Base(b) => self.visit_base_expr(b),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ impl Intern for BasicIntern {
|
|||||||
if let Some(obj_ref) = self.strs.get(s) {
|
if let Some(obj_ref) = self.strs.get(s) {
|
||||||
*obj_ref
|
*obj_ref
|
||||||
} else {
|
} else {
|
||||||
todo!("TODO(obj) intern strings - need attrs somehow")
|
todo!("TODO(obj) intern strings - need attrs for Str type somehow")
|
||||||
//let s = Str::new(&mut ctx, s.to_string());
|
//let s = Str::new(&mut ctx, s.to_string());
|
||||||
//ctx.gc_mut().alloc(s)
|
//ctx.gc_mut().alloc(s)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user