enum-path-derive 0.1.0

Derive macro for the enum-path crate
Documentation
1
2
3
4
5
6
7
8
9
10
use proc_macro::TokenStream;
use syn::{DeriveInput, parse_macro_input};
mod codegen;

#[proc_macro_derive(EnumPath, attributes(enum_path))]
pub fn derive_enum_path(input: TokenStream) -> TokenStream
{
    let input = parse_macro_input!(input as DeriveInput);
    TokenStream::from(codegen::derive_enum_path(&input))
}