Eval enhancements. Rewrote store to be significantly better

This commit is contained in:
Ava Apples Affine 2023-03-17 11:42:36 -07:00
parent 20821057f2
commit 3848d3bcfa
Signed by: affine
GPG key ID: 3A4645B8CF806069
6 changed files with 363 additions and 327 deletions

View file

@ -503,6 +503,28 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
}
);
syms.insert(
"get-doc".to_string(),
Symbol {
name: String::from("get-doc"),
args: Args::Lazy(1),
conditional_branches: true,
docs: decl::GETDOC_DOCSTRING.to_string(),
value: ValueType::Internal(Rc::new(decl::getdoc_callback)),
}
);
syms.insert(
"set-doc".to_string(),
Symbol {
name: String::from("get-doc"),
args: Args::Lazy(2),
conditional_branches: true,
docs: decl::SETDOC_DOCSTRING.to_string(),
value: ValueType::Internal(Rc::new(decl::setdoc_callback)),
}
);
Ok(())
}