use proc_macro2::{Span, TokenStream};
use quote::ToTokens;
pub const STRUCT_ENTRYPOINT_FN: ConstIdent = ConstIdent("__stylus_struct_entrypoint");
pub const STYLUS_HOST_FIELD: ConstIdent = ConstIdent("__stylus_host");
pub const STYLUS_CONTRACT_ADDRESS_FIELD: ConstIdent = ConstIdent("__stylus_contract_address");
pub const STRUCT_SUFFIX_FOR_TRAITS_IN_EXPORT_ABI: &str = "StylusAbiStruct";
pub struct ConstIdent(&'static str);
impl ConstIdent {
pub fn as_ident(&self) -> syn::Ident {
syn::Ident::new(self.0, Span::call_site())
}
}
impl ToTokens for ConstIdent {
fn to_tokens(&self, tokens: &mut TokenStream) {
self.as_ident().to_tokens(tokens);
}
}