Added support for defining macros in Rust within the macro system
Also fixed a lot of bugs
This commit is contained in:
@@ -28,6 +28,7 @@ use crate::api;
|
||||
use crate::atom::AtomHand;
|
||||
use crate::ctx::Ctx;
|
||||
use crate::dealias::{ChildError, ChildErrorKind, walk};
|
||||
use crate::expr::ExprKind;
|
||||
use crate::expr_store::ExprStore;
|
||||
use crate::system::SystemCtor;
|
||||
use crate::tree::MemberKind;
|
||||
@@ -56,6 +57,7 @@ impl Drop for ExtensionData {
|
||||
let mut exiting_snd = self.exiting_snd.clone();
|
||||
(self.ctx.spawn)(Box::pin(async move {
|
||||
reqnot.notify(api::HostExtNotif::Exit).await;
|
||||
|
||||
exiting_snd.send(()).await.unwrap()
|
||||
}))
|
||||
}
|
||||
@@ -247,6 +249,13 @@ impl Extension {
|
||||
let unit = atom.print(&FmtCtxImpl { i: &this.ctx().i }).await;
|
||||
hand.handle(eap, &unit.to_api()).await
|
||||
},
|
||||
api::ExtHostReq::CreateAtom(ref create @ api::CreateAtom(ref atom, target)) => {
|
||||
let atom = AtomHand::from_api(atom, Pos::None, &mut ctx.clone()).await;
|
||||
let target = ctx.system_inst(target).await.expect("Invalid recipient for atom");
|
||||
let expr = ExprKind::Atom(atom).at(Pos::None);
|
||||
target.ext().exprs().give_expr(expr.clone());
|
||||
hand.handle(create, &expr.id()).await
|
||||
},
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user