diff options
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 8df9035e9..9fe529f53 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -252,12 +252,12 @@ fn expr_bp( | |||
252 | // `newly_dollar_open` is a flag indicated that dollar is just closed after lhs, e.g. | 252 | // `newly_dollar_open` is a flag indicated that dollar is just closed after lhs, e.g. |
253 | // `$1$ + a` | 253 | // `$1$ + a` |
254 | // We use this flag to skip handling it. | 254 | // We use this flag to skip handling it. |
255 | let mut newly_dollar_open = false; | 255 | let mut newly_dollar_open = if p.at_l_dollar() { |
256 | |||
257 | if p.at_l_dollar() { | ||
258 | *dollar_lvl += p.eat_l_dollars(); | 256 | *dollar_lvl += p.eat_l_dollars(); |
259 | newly_dollar_open = true; | 257 | true |
260 | } | 258 | } else { |
259 | false | ||
260 | }; | ||
261 | 261 | ||
262 | let mut lhs = match lhs(p, r, dollar_lvl) { | 262 | let mut lhs = match lhs(p, r, dollar_lvl) { |
263 | Some((lhs, blocklike)) => { | 263 | Some((lhs, blocklike)) => { |
@@ -535,7 +535,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) { | |||
535 | } | 535 | } |
536 | EXCL => { | 536 | EXCL => { |
537 | let block_like = items::macro_call_after_excl(p); | 537 | let block_like = items::macro_call_after_excl(p); |
538 | return (m.complete(p, MACRO_CALL), block_like); | 538 | (m.complete(p, MACRO_CALL), block_like) |
539 | } | 539 | } |
540 | _ => (m.complete(p, PATH_EXPR), BlockLike::NotBlock), | 540 | _ => (m.complete(p, PATH_EXPR), BlockLike::NotBlock), |
541 | } | 541 | } |