Debian Codegraph @

gcc/testsuite/rust/execute/torture/macros26.rs

raw
1 macro_rules! count_tt {
2 ($t:tt) => { 1 };
3 ($t:tt $($ts:tt)*) => { 1 + count_tt!($($ts)*) };
4 }
5
6 fn main() -> i32 {
7 let count = count_tt!(1 2 let a = 15) + count_tt!(1 2 (let a = 15));
8 // ^ ^ ^^^ ^ ^ ^^ ^ ^ ^^^^^^^^^^^^
9 // 6 token-trees 3 token-trees
10
11 count - 9
12 }