generate a module trait and call it

This commit is contained in:
Pat Hickey
2020-01-23 12:46:57 -08:00
parent cb24fd97c0
commit b4f21752b0
7 changed files with 139 additions and 17 deletions

View File

@@ -42,7 +42,6 @@ impl Names {
}
}
#[allow(unused)]
pub fn type_ref(&self, tref: &TypeRef) -> TokenStream {
match tref {
TypeRef::Name(nt) => {
@@ -69,6 +68,10 @@ impl Names {
format_ident!("{}", id.as_str().to_snake_case())
}
pub fn trait_name(&self, id: &Id) -> Ident {
format_ident!("{}", id.as_str().to_camel_case())
}
pub fn func(&self, id: &Id) -> Ident {
format_ident!("{}", id.as_str().to_snake_case())
}