Added support for defining macros in Rust within the macro system

Also fixed a lot of bugs
This commit is contained in:
2025-09-30 21:23:16 +02:00
parent 7971a2b4eb
commit b77653f841
52 changed files with 849 additions and 502 deletions

View File

@@ -13,4 +13,4 @@ futures = { version = "0.3.31", features = ["std"], default-features = false }
itertools = "0.14.0"
[dev-dependencies]
test_executors = "0.3.2"
test_executors = "0.3.5"

View File

@@ -145,6 +145,16 @@ impl Request for ExtAtomPrint {
type Response = FormattingUnit;
}
/// Can specify the recipient of an atom as well. The main use case for this is
/// to be able to return an atom to other extensions, so it can be combined with
/// a [crate::Move].
#[derive(Clone, Debug, Coding, Hierarchy)]
#[extends(ExtHostReq)]
pub struct CreateAtom(pub Atom, pub SysId);
impl Request for CreateAtom {
type Response = ExprTicket;
}
/// Requests that apply to an existing atom instance
#[derive(Clone, Debug, Coding, Hierarchy)]
#[extends(HostExtReq)]

View File

@@ -85,6 +85,7 @@ pub enum ExtHostReq {
IntReq(interner::IntReq),
Fwd(atom::Fwd),
ExtAtomPrint(atom::ExtAtomPrint),
CreateAtom(atom::CreateAtom),
SysFwd(system::SysFwd),
ExprReq(expr::ExprReq),
SubLex(lexer::SubLex),