Rename Group to KeyGroup
This commit is contained in:
parent
6c99f7a53a
commit
fdc46aa3b8
4 changed files with 15 additions and 14 deletions
|
|
@ -49,7 +49,7 @@ pub fn derive_impl(input: DeriveInput) -> syn::Result<TokenStream> {
|
|||
#( #enum_variants )*
|
||||
}
|
||||
|
||||
impl ::cove_input::Group for #struct_ident {
|
||||
impl ::cove_input::KeyGroup for #struct_ident {
|
||||
type Event = #enum_ident;
|
||||
|
||||
fn event(&self, input: &mut ::cove_input::Input) -> Option<Self::Event> {
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
use syn::{parse_macro_input, DeriveInput};
|
||||
|
||||
mod document;
|
||||
mod group;
|
||||
mod key_group;
|
||||
mod util;
|
||||
|
||||
#[proc_macro_derive(Document, attributes(document))]
|
||||
|
|
@ -24,10 +24,10 @@ pub fn derive_document(input: proc_macro::TokenStream) -> proc_macro::TokenStrea
|
|||
}
|
||||
}
|
||||
|
||||
#[proc_macro_derive(Group)]
|
||||
#[proc_macro_derive(KeyGroup)]
|
||||
pub fn derive_group(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
let input = parse_macro_input!(input as DeriveInput);
|
||||
match group::derive_impl(input) {
|
||||
match key_group::derive_impl(input) {
|
||||
Ok(tokens) => tokens.into(),
|
||||
Err(err) => err.into_compile_error().into(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue