syn
syn copied to clipboard
Precedence for `Item` vs `Expr`
I'm trying to parse a macro call (along the lines of foo! { }
) inside an ItemFn
. When looking at Stmt
, I initially guessed this would be an expression, and I found the Macro
expression type. However, it turned out to be an Item
of type Macro
instead. As far as I can tell, macros can be used either way. How does syn decide which to use? Should the documentation (for Stmt
, for example) talk about this a little bit?