I'm trying to understand how Rust macro captures work and am looking at the nom parser library.
Location nom/src/bytes.rs declares macro tag!
which captures with ($i:expr, $tag: expr)
.
However throughout the places where tag!
is used it is used with only one argument, i.e. tag!("+")
.
Example: nom-lua52/op.rs. I've read tutorials about macros however this construct seems to be special.
It seems like the input $i
is somehow implicit?