finally figure out how to hold closures
This commit is contained in:
parent
69f31db23b
commit
f805290a4b
8 changed files with 98 additions and 89 deletions
11
src/str.rs
11
src/str.rs
|
|
@ -14,7 +14,7 @@
|
|||
* 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::func::{FTable, Function, Args, Operation};
|
||||
use crate::vars::{VTable};
|
||||
use crate::segment::{Ctr, Ast, circuit, ast_as_string};
|
||||
|
|
@ -29,7 +29,7 @@ pub fn get_echo() -> Function {
|
|||
loose_syms: false,
|
||||
eval_lazy: false,
|
||||
args: Args::Lazy(-1),
|
||||
function: Operation::Internal(
|
||||
function: Operation::Internal(Box::new(
|
||||
|a: Ast, _b: Rc<RefCell<VTable>>, _c: Rc<RefCell<FTable>>| -> Ctr {
|
||||
let mut string = String::from("");
|
||||
if !circuit(a, &mut |arg: &Ctr| {
|
||||
|
|
@ -50,7 +50,7 @@ pub fn get_echo() -> Function {
|
|||
}
|
||||
return Ctr::None;
|
||||
}
|
||||
)
|
||||
))
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ pub fn get_concat() -> Function {
|
|||
loose_syms: false,
|
||||
eval_lazy: false,
|
||||
args: Args::Lazy(-1),
|
||||
function: Operation::Internal(
|
||||
function: Operation::Internal(Box::new(
|
||||
|a: Ast, _b: Rc<RefCell<VTable>>, _c: Rc<RefCell<FTable>>| -> Ctr {
|
||||
let mut string = String::from("");
|
||||
if !circuit(a, &mut |arg: &Ctr| {
|
||||
|
|
@ -80,7 +80,6 @@ pub fn get_concat() -> Function {
|
|||
}
|
||||
return Ctr::String(string);
|
||||
}
|
||||
)
|
||||
))
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue