format
This commit is contained in:
parent
b873398a79
commit
e2d5748733
41 changed files with 291 additions and 268 deletions
|
|
@ -1,6 +1,6 @@
|
|||
use proc_macro2::TokenStream as TokenStream2;
|
||||
use syn::{parse_macro_input, parse_quote, DeriveInput, GenericParam, Generics};
|
||||
use proc_macro::{self, TokenStream};
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
use syn::{DeriveInput, GenericParam, Generics, parse_macro_input, parse_quote};
|
||||
|
||||
mod node;
|
||||
mod system;
|
||||
|
|
@ -12,8 +12,6 @@ pub fn system(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
|||
system::system(input)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[proc_macro_derive(Node)]
|
||||
pub fn node(input: proc_macro::TokenStream) -> TokenStream {
|
||||
let input = parse_macro_input!(input as DeriveInput);
|
||||
|
|
@ -29,4 +27,4 @@ fn add_trait_bounds(mut generics: Generics) -> Generics {
|
|||
}
|
||||
}
|
||||
generics
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ pub fn node(input: DeriveInput) -> TokenStream2 {
|
|||
};
|
||||
|
||||
expanded
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ use syn::DeriveInput;
|
|||
|
||||
use crate::add_trait_bounds;
|
||||
|
||||
|
||||
pub fn system(input: DeriveInput) -> TokenStream {
|
||||
let name = input.ident;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue