hook concat into stl
This commit is contained in:
parent
ff5e76ff98
commit
7ca42f18da
3 changed files with 6 additions and 3 deletions
|
|
@ -36,6 +36,6 @@ pub mod ast {
|
|||
|
||||
pub mod stdlib {
|
||||
pub use crate::stl::{get_stdlib};
|
||||
pub use crate::str::{get_echo};
|
||||
pub use crate::str::{get_echo, get_concat};
|
||||
pub use crate::append::{get_append};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use crate::str::get_echo;
|
||||
use crate::str::{get_echo, get_concat};
|
||||
use crate::append::get_append;
|
||||
use crate::func::{FTable, func_declare};
|
||||
use std::rc::Rc;
|
||||
|
|
@ -29,6 +29,9 @@ pub fn get_stdlib() -> Result<Rc<RefCell<FTable>>, String> {
|
|||
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_append()))) {
|
||||
return Err(s)
|
||||
}
|
||||
if let Some(s) = func_declare(ft.clone(), Rc::new(RefCell::new(get_concat()))) {
|
||||
return Err(s)
|
||||
}
|
||||
|
||||
return Ok(ft)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ pub fn get_echo() -> Function {
|
|||
Ctr::Seg(c) => string.push_str(ast_as_string(c.clone(), true).as_str()),
|
||||
Ctr::None => ()
|
||||
}
|
||||
println!(string)
|
||||
println!("{}", string);
|
||||
return true;
|
||||
}) {
|
||||
eprintln!("circuit loop in echo should not have returned false")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue