diff options
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 298030cb9..3e49e70c7 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -393,6 +393,18 @@ fn postfix_expr( | |||
393 | T![.] if p.nth(1) == IDENT && (p.nth(2) == T!['('] || p.nth(2) == T![::]) => { | 393 | T![.] if p.nth(1) == IDENT && (p.nth(2) == T!['('] || p.nth(2) == T![::]) => { |
394 | method_call_expr(p, lhs) | 394 | method_call_expr(p, lhs) |
395 | } | 395 | } |
396 | T![.] if p.nth(1) == AWAIT_KW => { | ||
397 | // test await_expr | ||
398 | // fn foo() { | ||
399 | // x.await; | ||
400 | // x.0.await; | ||
401 | // x.0().await?.hello(); | ||
402 | // } | ||
403 | let m = lhs.precede(p); | ||
404 | p.bump(); | ||
405 | p.bump(); | ||
406 | m.complete(p, AWAIT_EXPR) | ||
407 | } | ||
396 | T![.] => field_expr(p, lhs), | 408 | T![.] => field_expr(p, lhs), |
397 | // test postfix_range | 409 | // test postfix_range |
398 | // fn foo() { let x = 1..; } | 410 | // fn foo() { let x = 1..; } |