better eval and test for eval,quote

This commit is contained in:
Ava Apples Affine 2023-03-11 22:04:46 -08:00
parent 6daf0867df
commit 640a53cad8
Signed by: affine
GPG key ID: 3A4645B8CF806069
4 changed files with 72 additions and 8 deletions

View file

@ -470,6 +470,28 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
},
);
syms.insert(
"quote".to_string(),
Symbol {
name: String::from("quote"),
args: Args::Lazy(1),
conditional_branches: true,
docs: decl::QUOTE_DOCSTRING.to_string(),
value: ValueType::Internal(Rc::new(decl::quote_callback)),
},
);
syms.insert(
"eval".to_string(),
Symbol {
name: String::from("eval"),
args: Args::Lazy(1),
conditional_branches: true,
docs: decl::EVAL_DOCSTRING.to_string(),
value: ValueType::Internal(Rc::new(decl::eval_callback)),
},
);
Ok(())
}