mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
11 lines
240 B
Rust
11 lines
240 B
Rust
use super::*;
|
|
|
|
/// Expand the `#[capability]` macro.
|
|
pub fn expand(body: syn::ItemTrait) -> Result<TokenStream> {
|
|
let ident = &body.ident;
|
|
Ok(quote! {
|
|
#body
|
|
impl ::typst::model::Capability for dyn #ident {}
|
|
})
|
|
}
|