Open ehuss opened 5 years ago
This is an open question, especially when macros are involved. I'll try to finish https://github.com/rust-lang/rust/issues/61733 and come up with some consistent/improved rules.
Tentatively, ;
should be a part of the statement syntax and free ;
s should be (empty) statements as well.
For example, it currently allows multiple expressions without
;
separators which is not correct. It will need to handle the difference of expressions with/without blocks needing;
, etc.Also consider if Stmt should include macro invocation. Currently it is inherited via expression. Why does rustc parse statement macros separately from expressions (parse_stmt_without_recovery)?