use proc_macro2::Ident as Ident2;
use quote::format_ident;
use crate::types::Name;
#[must_use]
pub fn format_module_ident(name: &Name) -> Ident2 {
format_field_ident(name, None)
}
#[must_use]
pub fn format_field_ident(name: &Name, display_name: Option<&str>) -> Ident2 {
let ident = Name::format_field_name(display_name.unwrap_or(name.as_str()));
format_ident!("{ident}")
}
#[must_use]
pub fn format_type_ident(name: &Name, display_name: Option<&str>) -> Ident2 {
let ident = Name::format_type_name(display_name.unwrap_or(name.as_str()));
format_ident!("{ident}")
}
#[must_use]
pub fn format_variant_ident(name: &Name, display_name: Option<&str>) -> Ident2 {
format_type_ident(name, display_name)
}