sabi_derive 0.2.0

Derive macros for replication features in sabi
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub mod attr;
pub mod ctxt;
pub mod derive;
pub mod respan;
pub mod symbol;

pub use ctxt::Ctxt;
pub use derive::derive;

use syn::Type;

pub fn ungroup(mut ty: &Type) -> &Type {
    while let Type::Group(group) = ty {
        ty = &group.elem;
    }
    ty
}