1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
extern crate proc_macro;
extern crate proc_macro2;
#[macro_use]
extern crate quote;
#[macro_use]
extern crate syn;

use proc_macro::TokenStream;

mod euclid_matrix;

#[proc_macro_derive(EuclidMatrix)]
pub fn derive_euclid_matrix(input: TokenStream) -> TokenStream {
    let input = syn::parse(input).unwrap();
    euclid_matrix::derive(input).into()
}