add append function
This commit is contained in:
parent
37eba3008f
commit
ee3b53bfb5
5 changed files with 79 additions and 3 deletions
|
|
@ -14,7 +14,9 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use crate::str::get_echo;
|
||||
use crate::append::get_append;
|
||||
use crate::func::{FTable, func_declare};
|
||||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
|
|
@ -24,6 +26,9 @@ pub fn get_stdlib() -> Result<Rc<RefCell<FTable>>, String> {
|
|||
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_echo()))) {
|
||||
return Err(s)
|
||||
}
|
||||
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_append()))) {
|
||||
return Err(s)
|
||||
}
|
||||
|
||||
return Ok(ft)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue