Support if-let in scopes

This commit is contained in:
Aleksey Kladov 2018-08-27 12:22:09 +03:00
parent c16530c988
commit 07cbb7d73d
12 changed files with 289 additions and 104 deletions

View file

@ -237,11 +237,13 @@ fn for_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
// test cond
// fn foo() { if let Some(_) = None {} }
fn cond(p: &mut Parser) {
let m = p.start();
if p.eat(LET_KW) {
patterns::pattern(p);
p.expect(EQ);
}
expr_no_struct(p)
expr_no_struct(p);
m.complete(p, CONDITION);
}
// test match_expr