fix locking logic

This commit is contained in:
Aiden McClelland
2021-03-09 19:30:56 -07:00
parent 4dbff195d5
commit c2e50d0e88
7 changed files with 305 additions and 44 deletions

View File

@@ -0,0 +1,13 @@
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_derive(Model, attributes(serde))]
pub fn model_derive(input: TokenStream) -> TokenStream {
// Construct a representation of Rust code as a syntax tree
// that we can manipulate
let ast = syn::parse(input).unwrap();
// Build the trait implementation
patch_db_derive_internals::build_model(&ast).into()
}