#[macro_export]
macro_rules! static_data {
[
$(#[$($mt:tt)*])* pub $(($($v_t:tt)*))* static ref $name:ident: $t: ty = $a:expr; $($tt:tt)*
] => {
$crate::once_const_static_data! {
$(#[$($mt)*])* pub $( ($($v_t)*) )* static ref $name : $t = $a;
}
$crate::static_data! {
$($tt)*
}
};
[
$(#[$($mt:tt)*])* static ref $name:ident: $t: ty = $a:expr; $($tt:tt)*
] => {
$crate::once_const_static_data! {
$(#[$($mt)*])* static ref $name : $t = $a;
}
$crate::static_data! {
$($tt)*
}
};
[
$(#[$($mt:tt)*])* pub $(($($v_t:tt)*))* static ref +runtime $name:ident: $t: ty = $a:expr; $($tt:tt)*
] => {
$crate::once_runtime_data! {
$(#[$($mt)*])* pub $( ($($v_t)*) )* static ref +runtime $name : $t = $a;
}
$crate::static_data! {
$($tt)*
}
};
[
$(#[$($mt:tt)*])* static ref +runtime $name:ident: $t: ty = $a:expr; $($tt:tt)*
] => {
$crate::once_runtime_data! {
$(#[$($mt)*])* static ref +runtime $name : $t = $a;
}
$crate::static_data! {
$($tt)*
}
};
() => ()
}