aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src/grammar/expressions
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-27 10:22:09 +0100
committerAleksey Kladov <[email protected]>2018-08-27 10:22:09 +0100
commit07cbb7d73deed8dac3eecdbdc7e1eaf6938a6cd6 (patch)
tree4a1fa22fa8c908f0c3c9489a98aa2479f05def59 /crates/libsyntax2/src/grammar/expressions
parentc16530c988e817c5596fa38ebe9e12a302886a8f (diff)
Support if-let in scopes
Diffstat (limited to 'crates/libsyntax2/src/grammar/expressions')
-rw-r--r--crates/libsyntax2/src/grammar/expressions/atom.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/libsyntax2/src/grammar/expressions/atom.rs b/crates/libsyntax2/src/grammar/expressions/atom.rs
index d9c3f998a..bb5402af7 100644
--- a/crates/libsyntax2/src/grammar/expressions/atom.rs
+++ b/crates/libsyntax2/src/grammar/expressions/atom.rs
@@ -237,11 +237,13 @@ fn for_expr(p: &mut Parser, m: Option<Marker>) -> CompletedMarker {
237// test cond 237// test cond
238// fn foo() { if let Some(_) = None {} } 238// fn foo() { if let Some(_) = None {} }
239fn cond(p: &mut Parser) { 239fn cond(p: &mut Parser) {
240 let m = p.start();
240 if p.eat(LET_KW) { 241 if p.eat(LET_KW) {
241 patterns::pattern(p); 242 patterns::pattern(p);
242 p.expect(EQ); 243 p.expect(EQ);
243 } 244 }
244 expr_no_struct(p) 245 expr_no_struct(p);
246 m.complete(p, CONDITION);
245} 247}
246 248
247// test match_expr 249// test match_expr