polished-css-macros 0.1.0

Procedural macros which support the development of a library crate `polished-css`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use darling::FromDeriveInput;
use syn::{DeriveInput, Ident};

#[derive(darling::FromDeriveInput)]
#[darling(attributes(unit))]
pub struct UnitOptions {
    pub trait_ident: Ident,
}

pub fn get_unit_options(ast: &DeriveInput) -> UnitOptions {
    UnitOptions::from_derive_input(ast)
        .expect("Couldn't parse correctly the proc macro derive attributes for unit.")
}