ZIm/crates/gpui2_macros/src/gpui2_macros.rs
2023-12-10 19:33:38 -07:00

26 lines
629 B
Rust

mod derive_into_element;
mod register_action;
mod style_helpers;
mod test;
use proc_macro::TokenStream;
#[proc_macro]
pub fn register_action(ident: TokenStream) -> TokenStream {
register_action::register_action_macro(ident)
}
#[proc_macro_derive(IntoElement)]
pub fn derive_into_element(input: TokenStream) -> TokenStream {
derive_into_element::derive_into_element(input)
}
#[proc_macro]
pub fn style_helpers(input: TokenStream) -> TokenStream {
style_helpers::style_helpers(input)
}
#[proc_macro_attribute]
pub fn test(args: TokenStream, function: TokenStream) -> TokenStream {
test::test(args, function)
}