multiline shell, yay!
This commit is contained in:
parent
5bdf409a1f
commit
67af8bbd47
8 changed files with 76 additions and 48 deletions
|
|
@ -281,7 +281,6 @@ impl Symbol {
|
|||
evaluated_args = args;
|
||||
}
|
||||
|
||||
println!("args: {}", evaluated_args);
|
||||
self.args.validate_inputs(evaluated_args)?;
|
||||
match &self.value {
|
||||
ValueType::VarForm(ref f) => Ok(Box::new(*f.clone())),
|
||||
|
|
@ -362,18 +361,15 @@ impl Symbol {
|
|||
let value: ValueType;
|
||||
|
||||
if let Some(ref arg_syms) = arg_list {
|
||||
println!("def a func form");
|
||||
value = ValueType::FuncForm(UserFn{
|
||||
ast: Box::new(ast.clone()),
|
||||
arg_syms: arg_syms.clone(),
|
||||
});
|
||||
args = Args::Lazy(arg_syms.len() as u128);
|
||||
} else if let Ctr::Lambda(ref l) = *ast.car {
|
||||
println!("def a func form (lambda)");
|
||||
args = Args::Lazy(l.arg_syms.len() as u128);
|
||||
value = ValueType::FuncForm(l.clone());
|
||||
} else {
|
||||
println!("def a var form");
|
||||
args = Args::None;
|
||||
value = ValueType::VarForm(ast.car.clone());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue