export vars fixed. tests pass
This commit is contained in:
parent
307101327c
commit
1b1ac3cd2b
3 changed files with 17 additions and 7 deletions
11
src/vars.rs
11
src/vars.rs
|
|
@ -49,7 +49,16 @@ pub fn get_export(env_cfg: bool) -> Function {
|
|||
let inner = a.borrow_mut();
|
||||
match &inner.car {
|
||||
Ctr::Symbol(identifier) => {
|
||||
define(b, identifier.to_string(), Rc::new(inner.cdr.clone()));
|
||||
match inner.cdr.clone() {
|
||||
Ctr::Seg(val) => {
|
||||
let val_tmp = val.borrow().clone();
|
||||
define(b, identifier.to_string(), Rc::new(val_tmp.car));
|
||||
},
|
||||
|
||||
_ => {
|
||||
eprintln!("impossible args to export");
|
||||
}
|
||||
}
|
||||
return Ctr::None;
|
||||
},
|
||||
_ => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue