syn icon indicating copy to clipboard operation
syn copied to clipboard

Precedence for `Item` vs `Expr`

Open djc opened this issue 5 years ago • 0 comments

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?

djc avatar Oct 15 '19 10:10 djc