Questions about macros

The macro expander matches and transcribes every token that does not begin with a $ literally, including delimiters. For parsing reasons, delimiters must be balanced, but they are otherwise not special.
https://doc.rust-lang.org/stable/reference.html#macros

what does 'balanced' mean?

It means that you need a closing delimiter for every opening delimiter. For example, every opening "(" needs a closing ")".

2 Likes

thank you.