macro
Token trees and grouped syntax
A token tree is one token or a balanced delimited group. Use this capture for syntax that another rule will inspect; a sequence of separate tokens needs repetition. Expected stdout (not executed): '[ready]\n' Common mistake: A bare sequence a + b is not one token tree.
Formal Syntax & Structure
rust syntaxrust
$tree:ttWorking Example
Example Snippetrust
macro_rules! show_group { ($tree:tt) => { stringify!($tree) }; }fn main() { println!("{}", show_group!([ready])); }