WIP: testing closure types

This commit is contained in:
Aidan Hahn 2021-12-31 11:00:13 -08:00
parent 4cadb1a7eb
commit 69f31db23b
No known key found for this signature in database
GPG key ID: 327711E983899316
7 changed files with 24 additions and 20 deletions

View file

@ -16,8 +16,8 @@
*/
use crate::segment::{Ctr};
use crate::str::{get_echo, get_concat};
use crate::append::get_append;
//use crate::str::{get_echo, get_concat};
//use crate::append::get_append;
use crate::func::{FTable, func_declare};
use crate::vars::{VTable, get_export};
use std::rc::Rc;
@ -25,7 +25,7 @@ use std::cell::RefCell;
pub fn get_stdlib(conf: Rc<RefCell<VTable>>) -> Result<Rc<RefCell<FTable>>, String> {
let ft = Rc::new(RefCell::new(FTable::new()));
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_echo()))) {
/* 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()))) {
@ -33,7 +33,7 @@ pub fn get_stdlib(conf: Rc<RefCell<VTable>>) -> Result<Rc<RefCell<FTable>>, Stri
}
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_concat()))) {
return Err(s)
}
}*/
let mut cfg_env = true;
match conf.borrow().get(&String::from("CFG_RELISH_ENV")) {