2022-01-26 05:55:01 +11:00
|
|
|
use proc_macro::TokenStream;
|
2022-03-04 06:37:01 +11:00
|
|
|
|
2022-03-17 01:53:25 +11:00
|
|
|
mod enums;
|
|
|
|
mod params;
|
2022-02-15 02:16:05 +11:00
|
|
|
|
2022-06-04 06:22:36 +10:00
|
|
|
/// Derive the `Enum` trait for simple enum parameters. See `EnumParam` for more information.
|
|
|
|
#[proc_macro_derive(Enum, attributes(name, id))]
|
2022-02-15 02:16:05 +11:00
|
|
|
pub fn derive_enum(input: TokenStream) -> TokenStream {
|
2022-03-17 01:53:25 +11:00
|
|
|
enums::derive_enum(input)
|
|
|
|
}
|
2022-02-15 02:16:05 +11:00
|
|
|
|
2022-03-17 01:53:25 +11:00
|
|
|
/// Derive the `Params` trait for your plugin's parameters struct. See the `Plugin` trait.
|
|
|
|
#[proc_macro_derive(Params, attributes(id, persist, nested))]
|
|
|
|
pub fn derive_params(input: TokenStream) -> TokenStream {
|
|
|
|
params::derive_params(input)
|
2022-02-15 02:16:05 +11:00
|
|
|
}
|