add variable export function
This commit is contained in:
parent
7ca42f18da
commit
0931fbdcf0
5 changed files with 102 additions and 6 deletions
|
|
@ -18,6 +18,7 @@
|
|||
use crate::str::{get_echo, get_concat};
|
||||
use crate::append::get_append;
|
||||
use crate::func::{FTable, func_declare};
|
||||
use crate::vars::{get_export};
|
||||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
|
||||
|
|
@ -32,6 +33,9 @@ pub fn get_stdlib() -> Result<Rc<RefCell<FTable>>, String> {
|
|||
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_concat()))) {
|
||||
return Err(s)
|
||||
}
|
||||
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_export()))) {
|
||||
return Err(s)
|
||||
}
|
||||
|
||||
return Ok(ft)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue