finished inc and dec, and tests
This commit is contained in:
parent
c74d6f5ddf
commit
8bf4b3c368
4 changed files with 304 additions and 17 deletions
22
src/stl.rs
22
src/stl.rs
|
|
@ -349,6 +349,28 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
|
|||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"inc".to_string(),
|
||||
Symbol {
|
||||
name: String::from("inc"),
|
||||
args: Args::Lazy(1),
|
||||
conditional_branches: true,
|
||||
docs: math::INC_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::inc_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"dec".to_string(),
|
||||
Symbol {
|
||||
name: String::from("dec"),
|
||||
args: Args::Lazy(1),
|
||||
conditional_branches: true,
|
||||
docs: math::DEC_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(math::dec_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue