This commit is contained in:
@@ -7,7 +7,7 @@ use orchid_extension::atom_owned::{OwnedAtom, OwnedVariant, own};
|
||||
use orchid_extension::conv::ToExpr;
|
||||
use orchid_extension::coroutine_exec::exec;
|
||||
use orchid_extension::expr::Expr;
|
||||
use orchid_extension::gen_expr::GExpr;
|
||||
use orchid_extension::gen_expr::{GExpr, new_atom};
|
||||
|
||||
use crate::macros::mactree::{MacTok, MacTree};
|
||||
|
||||
@@ -41,7 +41,7 @@ impl OwnedAtom for InstantiateTplCall {
|
||||
Ok(t) => self.argv.push(own(&t).await),
|
||||
};
|
||||
if self.argv.len() < self.argc {
|
||||
return self.to_gen().await;
|
||||
return new_atom(self);
|
||||
}
|
||||
let mut args = self.argv.into_iter();
|
||||
let ret = self.tpl.map(&mut false, &mut |mt| match mt.tok() {
|
||||
@@ -49,7 +49,7 @@ impl OwnedAtom for InstantiateTplCall {
|
||||
_ => None,
|
||||
});
|
||||
assert!(args.next().is_none(), "Too many arguments for all slots");
|
||||
ret.to_gen().await
|
||||
new_atom(ret)
|
||||
})
|
||||
.await
|
||||
.to_gen()
|
||||
|
||||
Reference in New Issue
Block a user