add append function
This commit is contained in:
parent
37eba3008f
commit
ee3b53bfb5
5 changed files with 79 additions and 3 deletions
|
|
@ -21,6 +21,8 @@ use crate::segment::{Ctr, Ast, circuit, ast_as_string};
|
|||
use std::rc::Rc;
|
||||
use std::cell::RefCell;
|
||||
|
||||
// Current primitive is to use a get_NNNNN function defined for each library function which returns a not-previously-owned
|
||||
// copy of the Function struct.
|
||||
pub fn get_echo() -> Function {
|
||||
return Function{
|
||||
name: String::from("echo"),
|
||||
|
|
@ -44,8 +46,7 @@ pub fn get_echo() -> Function {
|
|||
string.push_str("\n");
|
||||
return true;
|
||||
}) {
|
||||
// TODO: use custom logger
|
||||
println!("Echo failure!")
|
||||
eprintln!("circuit loop in echo should not have returned false")
|
||||
}
|
||||
return Ctr::String(string);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue