From eb0e9bd98132dabbd908b473c5c1131f0787ffac Mon Sep 17 00:00:00 2001 From: bravomikekilo Date: Tue, 13 Aug 2019 18:17:10 +0800 Subject: add inline test --- crates/ra_parser/src/grammar/expressions.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_parser/src/grammar/expressions.rs') 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( return Some((m.complete(p, RANGE_EXPR), BlockLike::NotBlock)); } _ => { + // test expression_after_block + // fn foo() { + // let mut p = F{x: 5}; + // {p}.x = 10; + // } + // let (lhs, blocklike) = atom::atom_expr(p, r)?; return Some(postfix_expr(p, lhs, blocklike, !(r.prefer_stmt && blocklike.is_block()))); } -- cgit v1.2.3