scrypto_bindgen/macros.rs
1#[macro_export]
2macro_rules! token_stream_from_str {
3 ($string: expr) => {
4 <proc_macro2::TokenStream as std::str::FromStr>::from_str($string)
5 .expect("Obtained from schema, must be valid!")
6 };
7}
8
9#[macro_export]
10macro_rules! ident {
11 ($ident: expr) => {
12 syn::Ident::new($ident, proc_macro2::Span::call_site())
13 };
14}