Skip to main content

streamhouse_derive/
lib.rs

1use quote::quote;
2use syn::{parse_macro_input, DeriveInput};
3
4mod row;
5
6#[proc_macro_derive(Row)]
7pub fn derive_row(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
8    let DeriveInput {
9        ident,
10        data,
11        attrs: _,
12        ..
13    } = parse_macro_input!(input);
14
15    let s = row::RowStruct::parse(&ident, &data);
16
17    quote!(#s).into()
18}