add boolean cast function
This commit is contained in:
parent
001e35755d
commit
ce3dba470a
4 changed files with 133 additions and 2 deletions
11
src/stl.rs
11
src/stl.rs
|
|
@ -162,6 +162,17 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
|
|||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"bool".to_string(),
|
||||
Symbol {
|
||||
name: String::from("bool"),
|
||||
args: Args::Infinite,
|
||||
conditional_branches: false,
|
||||
docs: boolean::BOOLCAST_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(boolean::boolcast_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"or".to_string(),
|
||||
Symbol {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue