macros, vm, bytecode: add #[handler] await-style primop macro

This commit is contained in:
2026-08-23 17:41:50 +08:00
parent 89f5d84009
commit ac7574565d
16 changed files with 1770 additions and 610 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ proc-macro = true
[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "3.0", features = ["full", "visit-mut"] }
syn = { version = "3.0", features = ["full", "visit", "visit-mut"] }
[lints]
workspace = true
File diff suppressed because it is too large Load Diff
+10
View File
@@ -1,5 +1,15 @@
extern crate proc_macro;
mod handler;
#[proc_macro_attribute]
pub fn handler(
attr: proc_macro::TokenStream,
item: proc_macro::TokenStream,
) -> proc_macro::TokenStream {
handler::handler(attr.into(), item.into()).into()
}
// Adapted from `__unelide_lifetimes` in `gc-arena-derive`.
// Licensed under the MIT license.
// See: https://github.com/kyren/gc-arena