added env function and test
This commit is contained in:
parent
79184b18ef
commit
f22d807b57
5 changed files with 55 additions and 1 deletions
11
src/stl.rs
11
src/stl.rs
|
|
@ -172,6 +172,17 @@ pub fn static_stdlib(syms: &mut SymTable) -> Result<(), String> {
|
|||
},
|
||||
);
|
||||
|
||||
syms.insert(
|
||||
"env".to_string(),
|
||||
Symbol {
|
||||
name: String::from("env"),
|
||||
args: Args::None,
|
||||
conditional_branches: false,
|
||||
docs: decl::ENV_DOCSTRING.to_string(),
|
||||
value: ValueType::Internal(Rc::new(decl::env_callback)),
|
||||
},
|
||||
);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue