update export callback and add tests

Signed-off-by: Ava Hahn <ava@aidanis.online>
This commit is contained in:
Ava Hahn 2023-02-28 11:57:59 -08:00
parent c5e68f25ba
commit fbb85f2e3d
Signed by untrusted user who does not match committer: affine
GPG key ID: 3A4645B8CF806069
2 changed files with 108 additions and 2 deletions

View file

@ -59,7 +59,7 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
pub fn dynamic_stdlib(env: bool, syms: &mut SymTable) -> Result<(), String> {
syms.insert("def".to_string(), Symbol {
name: String::from("define"),
args: Args::Lazy(2),
args: Args::Infinite,
conditional_branches: true,
value: ValueType::Internal(Rc::new( move |ast: &Seg, syms: &mut SymTable| -> Result<Ctr, String> {
_store_callback(ast, syms, env)