rust/src/libsyntax
bors 06ca016b6e Auto merge of #34886 - jseyfried:improve_stmt_matchers, r=eddyb
macros: fix bug in `stmt` matchers

Today, `stmt` matchers stop too early when parsing expression statements that begin with non-braced macro invocations. For example,
```rust
fn main() {
    macro_rules! m { ($s:stmt;) => { $s } }
    id!(vec![].push(0););
    //^ Before this PR, the `stmt` matcher only consumes "vec![]", so this is an error.
    //| After this PR, the `stmt` matcher consumes "vec![].push(0)", so this compiles.
}
```
This change is backwards compatible due to the follow set for `stmt`.

r? @eddyb
2016-07-18 01:40:23 -07:00
..
2016-07-13 04:49:32 +00:00
2016-07-17 17:12:35 +00:00
2016-07-14 13:25:06 -04:00
2016-07-14 07:57:46 -04:00
2016-07-17 17:12:35 +00:00