Skip to content

Instantly share code, notes, and snippets.

@eaglgenes101
Created September 8, 2018 02:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eaglgenes101/385d41fb8ee55dd459b5b266587a44ff to your computer and use it in GitHub Desktop.
Save eaglgenes101/385d41fb8ee55dd459b5b266587a44ff to your computer and use it in GitHub Desktop.
macro_rules! variant_enums {
(
{ $( $variant:ident ),* } {
$(
$( #[ $oemval:meta ] )*
$oldvariant:ident => $newvariant:ident
),*
}
) => {
$(
variant_enum!(
$variant {
$(
$( #[ $oemval ] )*
$oldvariant => $newvariant
),*
}
);
)*
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment