feat: Pipe

This commit is contained in:
2025-01-29 00:04:00 -05:00
parent 6fa4b21c4f
commit 9d944c3218
15 changed files with 888 additions and 235 deletions

13
macro/src/macros.rs Normal file
View File

@@ -0,0 +1,13 @@
macro_rules! enum_to_tokens {
($enum:ident: $($variant:ident),*) => {
impl ToTokens for $enum {
fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) {
tokens.extend(match self {
$(Self::$variant(variant) => quote! { #variant },)*
});
}
}
};
}
pub(crate) use enum_to_tokens;