macro_rules! tags { { // Permit arbitrary meta items, which include documentation. $( #[$enum_attr:meta] )* $vis:vis enum $name:ident($ty:tt) $(unknown($unknown_doc:literal))* { // Each of the `Name = Val,` permitting documentation. $($(#[$ident_attr:meta])* $tag:ident = $val:expr,)* } } => { ... }; ($name:tt, u16, $($unknown_doc:literal)*) => { ... }; ($name:tt, $ty:tt, $($unknown_doc:literal)*) => { ... }; }