lsor_proc_macro/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use proc_macro::TokenStream;

pub(crate) mod filter;
pub(crate) mod row;
pub(crate) mod sort;
pub(crate) mod ty;
pub(crate) mod util;

#[proc_macro_derive(Filter, attributes(lsor))]
pub fn derive_filter(input: TokenStream) -> TokenStream {
    filter::expand_derive_filter(input)
}

#[proc_macro_derive(Row, attributes(lsor))]
pub fn derive_row(input: TokenStream) -> TokenStream {
    row::expand_derive_row(input)
}

#[proc_macro_derive(Sort)]
pub fn derive_sort(input: TokenStream) -> TokenStream {
    sort::expand_derive_sort(input)
}

#[proc_macro_derive(Type, attributes(sqlx))]
pub fn derive_type(input: TokenStream) -> TokenStream {
    ty::expand_derive_type(input)
}