added first draft for lib-crates for test_random and test_random_derive (lighthouse-246)

This commit is contained in:
thojest
2019-02-22 12:16:11 +01:00
parent c040ed7b11
commit 5f3ba42b97
5 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
extern crate proc_macro;
use crate::proc_macro::TokenStream;
use quote::quote;
use syn;
use syn::DeriveInput;
#[proc_macro_derive(TestRandom)]
pub fn test_random_derive(input: TokenStream) -> TokenStream {
let ast = syn::parse(input).unwrap();
impl_test_random(&ast)
}
fn impl_test_random(ast: &DeriveInput) -> TokenStream {}