in progress conversion of export to eval_lazy
This commit is contained in:
parent
827458b06f
commit
5d345a4c73
1 changed files with 3 additions and 2 deletions
|
|
@ -42,14 +42,14 @@ pub fn get_export(env_cfg: bool) -> Function {
|
|||
return Function{
|
||||
name: String::from("export"),
|
||||
loose_syms: true,
|
||||
eval_lazy: false,
|
||||
eval_lazy: true,
|
||||
args: Args::Lazy(2),
|
||||
function: Operation::Internal(
|
||||
|a: Ast, b: Rc<RefCell<VTable>>, _c: Rc<RefCell<FTable>>| -> Ctr {
|
||||
let inner = a.borrow_mut();
|
||||
match &inner.car {
|
||||
Ctr::Symbol(identifier) => {
|
||||
match inner.cdr.clone() {
|
||||
match eval(inner.cdr) {
|
||||
Ctr::Seg(val) => {
|
||||
let val_tmp = val.borrow().clone();
|
||||
define(b, identifier.to_string(), Rc::new(val_tmp.car));
|
||||
|
|
@ -62,6 +62,7 @@ pub fn get_export(env_cfg: bool) -> Function {
|
|||
return Ctr::None;
|
||||
},
|
||||
_ => {
|
||||
println!("{:#?}", a);
|
||||
eprintln!("first argument to export must be a symbol");
|
||||
return Ctr::None;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue