aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-17 11:12:50 +0000
committerGitHub <[email protected]>2019-12-17 11:12:50 +0000
commit827831de87ee16c4cd9744b93aecd86fb6e438e5 (patch)
tree193ec8e3cb01ed0a99770334c55778814c9c0d05 /crates/ra_parser
parentcb79e30d53d9aae843eb006f92212c2d5f888382 (diff)
parent3e2f4e42937cb6e6855df94e424b55ed102af44d (diff)
Merge #2577
2577: Improve recovery for incomplete lambdas r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/src/grammar/expressions/atom.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs
index f06191963..09f0a2d98 100644
--- a/crates/ra_parser/src/grammar/expressions/atom.rs
+++ b/crates/ra_parser/src/grammar/expressions/atom.rs
@@ -248,7 +248,12 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker {
248 p.error("expected `{`"); 248 p.error("expected `{`");
249 } 249 }
250 } 250 }
251 expr(p); 251
252 if p.at_ts(EXPR_FIRST) {
253 expr(p);
254 } else {
255 p.error("expected expression");
256 }
252 m.complete(p, LAMBDA_EXPR) 257 m.complete(p, LAMBDA_EXPR)
253} 258}
254 259