diff options
author | bravomikekilo <[email protected]> | 2019-08-13 11:17:10 +0100 |
---|---|---|
committer | bravomikekilo <[email protected]> | 2019-08-13 11:17:10 +0100 |
commit | eb0e9bd98132dabbd908b473c5c1131f0787ffac (patch) | |
tree | 017a39672689eae3defabcafaf75479d2ba23559 /crates/ra_parser/src/grammar | |
parent | 562359d706fc9365c20ee8a6785b93bb48a0e07a (diff) |
add inline test
Diffstat (limited to 'crates/ra_parser/src/grammar')
-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 | } |