third_party/rust/euclid_macros/lib.rs
author Emilio Cobos Álvarez <emilio@crisal.io>
Sat, 12 Jan 2019 16:49:16 +0100
changeset 453671 be569ca36f5f3a9643702d1974ebc8dd50770359
permissions -rw-r--r--
Bug 1519639 - Update euclid. r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D16390

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()
}