From 466885aa5bad53732786380f7579880fe2fd5645 Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Thu, 20 Dec 2018 16:22:13 +0000 Subject: Fix missing DOTDOTEQs --- crates/ra_syntax/src/grammar/expressions.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/ra_syntax/src/grammar/expressions.rs b/crates/ra_syntax/src/grammar/expressions.rs index 4f8c46ab3..1608b1a73 100644 --- a/crates/ra_syntax/src/grammar/expressions.rs +++ b/crates/ra_syntax/src/grammar/expressions.rs @@ -206,7 +206,7 @@ fn expr_bp(p: &mut Parser, r: Restrictions, bp: u8) -> BlockLike { } const LHS_FIRST: TokenSet = token_set_union![ - token_set![AMP, STAR, EXCL, DOTDOT, MINUS], + token_set![AMP, STAR, EXCL, DOTDOT, DOTDOTEQ, MINUS], atom::ATOM_EXPR_FIRST, ]; @@ -237,7 +237,7 @@ fn lhs(p: &mut Parser, r: Restrictions) -> Option<(CompletedMarker, BlockLike)> } // test full_range_expr // fn foo() { xs[..]; } - DOTDOT => { + DOTDOT | DOTDOTEQ => { m = p.start(); p.bump(); if p.at_ts(EXPR_FIRST) { @@ -287,7 +287,7 @@ fn postfix_expr( DOT if p.nth(1) == INT_NUMBER => field_expr(p, lhs), // test postfix_range // fn foo() { let x = 1..; } - DOTDOT if !EXPR_FIRST.contains(p.nth(1)) => { + DOTDOT | DOTDOTEQ if !EXPR_FIRST.contains(p.nth(1)) => { let m = lhs.precede(p); p.bump(); m.complete(p, RANGE_EXPR) -- cgit v1.2.3