Macro repetition controls how often a matched pattern occurs: zero or more times with *, one or more with +, or zero or one time with ?. A matcher captures repeated expressions, while the transcriber emits code for each capture. section 2.1.4
Build a vector from repeated expressions
A matcher such as $[($x:expr),+] accepts one or more expressions. The transcriber repeats v.push($x); for every captured expression, producing a Vec while preserving ordinary Rust compilation and type checking. section 2.1.4
$[($x:expr),+] => (
{
let mut v = Vec::new();
$(
v.push($x);
)+
v
}
)
Inspect the complete repeated-expression macro, including its + matcher and repeated push operation. section 2.1.4
Captures must be repeated at the matching depth: removing the transcriber’s repetition leaves $x repeating where one expression is expected. Generated code still obeys Rust’s type rules, so mixed integer and string inputs fail to compile. section 2.1.4

