macro_rules! log {
($($x:expr),*) => {
{
$(
//how to detect $x in the Macro repetition?
)*
}
};
}
我不想使用($($x:ident),*). 宏可以记录表达式,然后log!我想匹配变量类型。
macro_rules! log {
($($x:expr),*) => {
{
$(
//how to detect $x in the Macro repetition?
)*
}
};
}
我不想使用($($x:ident),*). 宏可以记录表达式,然后log!我想匹配变量类型。