master
Skye 2 years ago
parent 12536c2d5c
commit 96345d7a4a

@ -80,11 +80,11 @@ pub fn gen_fsm(item: TokenStream) -> TokenStream {
fn to_ident(name: &str) -> Ident {
Ident::new(
&name
.replace(' ', " space ")
.replace(';', " semicolon ") // Sanitize ident-unsafe characters
.replace('!', " exclamation ")
.replace(',', " comma ")
.replace('.', " period ") // I'm not calling it a full stop
.replace(' ', " space")
.to_case(Case::Pascal),
Span::call_site().into(),
)

Loading…
Cancel
Save