diff options
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 7 |
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 | ||