macro_rules! new_type { ($type_name:ident,BuiltIn) => { ... }; ($type_name:ident,External) => { ... }; ($type_name:ident) => { ... }; ($type_name:ident,Generic) => { ... }; }
Expand description
An easy way to implement TypeName::get_type_parts if it only needs to return a single type without generics.
let name = tealr::new_type!(Example, External);
assert_eq!(name,Cow::Borrowed(&[tealr::NamePart::Type(tealr::TealType{
name: Cow::Borrowed("Example"),
type_kind: tealr::KindOfType::External,
generics:None
})]))