Add support for String

This commit is contained in:
Mihai Dinculescu
2022-10-20 15:42:51 +01:00
parent 60b73c1557
commit 4ac94cdb96
21 changed files with 574 additions and 404 deletions

View File

@@ -0,0 +1,9 @@
pub fn get_attribute(attrs: &[syn::Attribute]) -> Option<&syn::Attribute> {
attrs
.iter()
.find(|&attr| attr.path.segments.len() == 1 && attr.path.segments[0].ident == "simconnect")
}
pub fn mk_err<T: quote::ToTokens>(t: T, message: &str) -> proc_macro2::TokenStream {
syn::Error::new_spanned(t, message).to_compile_error()
}