Rust: macro expansion

This commit is contained in:
Arthur Baars
2024-09-27 16:20:34 +02:00
parent cad2b74137
commit 0b3b95ab54
17 changed files with 427 additions and 31 deletions

View File

@@ -1,2 +1,2 @@
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
top.rs 00321b829ffca674c66daa86c003b9d5f8c64fef42873d03fa677cfa479039a2 00321b829ffca674c66daa86c003b9d5f8c64fef42873d03fa677cfa479039a2
top.rs bbb8453f35cce3f2afa86b32c01296f78a24c19f504f9416aa049d256d11d23a bbb8453f35cce3f2afa86b32c01296f78a24c19f504f9416aa049d256d11d23a

View File

@@ -8631,6 +8631,12 @@ impl trap::TrapEntry for MacroCall {
}
}
impl MacroCall {
pub fn emit_expanded(id: trap::Label<Self>, value: trap::Label<AstNode>, out: &mut trap::Writer) {
out.add_tuple("macro_call_expandeds", vec![id.into(), value.into()]);
}
}
impl trap::TrapClass for MacroCall {
fn class_name() -> &'static str { "MacroCall" }
}