Spread out implementations of symbol and attrs-related things, add impl
blocks for TranslateAst Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -8,31 +8,15 @@ use crate::{
|
||||
};
|
||||
use std::rc::Rc;
|
||||
|
||||
/*
|
||||
fn root_ns<I: Intern, G: Gc>(intern: &mut I, gc: &mut G) -> Ns {
|
||||
let mut ns: Ns = Default::default();
|
||||
ns.insert(
|
||||
intern.intern_sym("Unit"),
|
||||
Attrs::new(gc, Default::default()),
|
||||
);
|
||||
ns
|
||||
}
|
||||
*/
|
||||
|
||||
pub struct State<I: Intern, G: Gc> {
|
||||
intern: I,
|
||||
pub struct State<G: Gc> {
|
||||
gc: G,
|
||||
root_ns: Ns,
|
||||
frames: Vec<Frame>,
|
||||
}
|
||||
|
||||
impl<I: Intern, G: Gc> State<I, G> {
|
||||
pub fn new(intern: I, gc: G, root_ns: Ns) -> Self {
|
||||
//let root_ns = root_ns(&mut intern, &mut gc);
|
||||
impl<G: Gc> State<G> {
|
||||
pub fn new(gc: G) -> Self {
|
||||
State {
|
||||
intern,
|
||||
gc,
|
||||
root_ns,
|
||||
frames: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user