Several changes, see commit msg
* clean up all tests * bugfix for zero value functions, and test * removed expand function, put in snippets * added doc strings to Symbol type * added doc strings to symbol declarations * implemented display for Args type * wrote a help function * wrote docstrings for all builtins and config vars
This commit is contained in:
parent
4b587f11ab
commit
dc6342bc74
16 changed files with 575 additions and 677 deletions
|
|
@ -46,11 +46,3 @@ pub fn append_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, String> {
|
|||
Ok(Ctr::Seg(temp))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn expand_callback(ast: &Seg, _syms: &mut SymTable) -> Result<Ctr, String> {
|
||||
if let Ctr::Seg(_) = *ast.car {
|
||||
Ok(*ast.car.clone())
|
||||
} else {
|
||||
Err("non list passed to expand!".to_string())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ pub fn let_callback(ast: &Seg, syms: &mut SymTable) -> Result<Ctr, String> {
|
|||
name: name.clone(),
|
||||
args: Args::None,
|
||||
conditional_branches: false,
|
||||
docs: "variable used in let form".to_string(),
|
||||
value: ValueType::VarForm(Box::new(*var_val_res.unwrap().clone())),
|
||||
},
|
||||
);
|
||||
|
|
@ -166,7 +167,7 @@ pub fn let_callback(ast: &Seg, syms: &mut SymTable) -> Result<Ctr, String> {
|
|||
}
|
||||
|
||||
if let Err(e) = res {
|
||||
eprintln!("error evaluating let form: {}", e);
|
||||
eprintln!("{}", e);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue