diff options
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 26f184785..b60a2f68c 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -359,6 +359,12 @@ fn lhs( | |||
359 | return Some((m.complete(p, RANGE_EXPR), BlockLike::NotBlock)); | 359 | return Some((m.complete(p, RANGE_EXPR), BlockLike::NotBlock)); |
360 | } | 360 | } |
361 | _ => { | 361 | _ => { |
362 | // test expression_after_block | ||
363 | // fn foo() { | ||
364 | // let mut p = F{x: 5}; | ||
365 | // {p}.x = 10; | ||
366 | // } | ||
367 | // | ||
362 | let (lhs, blocklike) = atom::atom_expr(p, r)?; | 368 | let (lhs, blocklike) = atom::atom_expr(p, r)?; |
363 | return Some(postfix_expr(p, lhs, blocklike, !(r.prefer_stmt && blocklike.is_block()))); | 369 | return Some(postfix_expr(p, lhs, blocklike, !(r.prefer_stmt && blocklike.is_block()))); |
364 | } | 370 | } |