diff options
author | Josh Robson Chase <[email protected]> | 2019-01-23 18:14:34 +0000 |
---|---|---|
committer | Josh Robson Chase <[email protected]> | 2019-01-23 18:19:49 +0000 |
commit | 3b70acad0106e4ffe5ee68d565c9130b5b271e22 (patch) | |
tree | 72b32afb919c5317219c0891ced8c9725d622bbc /crates/ra_syntax/src/grammar/expressions.rs | |
parent | 1cd6d6539a9d85bc44db364bb9165e6d9253790d (diff) |
Use IDENT for both raw and normal idents
Diffstat (limited to 'crates/ra_syntax/src/grammar/expressions.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/expressions.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/grammar/expressions.rs b/crates/ra_syntax/src/grammar/expressions.rs index 107b7cda4..2236555e0 100644 --- a/crates/ra_syntax/src/grammar/expressions.rs +++ b/crates/ra_syntax/src/grammar/expressions.rs | |||
@@ -281,7 +281,7 @@ fn postfix_expr( | |||
281 | // } | 281 | // } |
282 | L_PAREN if allow_calls => call_expr(p, lhs), | 282 | L_PAREN if allow_calls => call_expr(p, lhs), |
283 | L_BRACK if allow_calls => index_expr(p, lhs), | 283 | L_BRACK if allow_calls => index_expr(p, lhs), |
284 | DOT if p.nth(1).is_ident() && (p.nth(2) == L_PAREN || p.nth(2) == COLONCOLON) => { | 284 | DOT if p.nth(1) == IDENT && (p.nth(2) == L_PAREN || p.nth(2) == COLONCOLON) => { |
285 | method_call_expr(p, lhs) | 285 | method_call_expr(p, lhs) |
286 | } | 286 | } |
287 | DOT => field_expr(p, lhs), | 287 | DOT => field_expr(p, lhs), |
@@ -332,7 +332,7 @@ fn index_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { | |||
332 | // y.bar::<T>(1, 2,); | 332 | // y.bar::<T>(1, 2,); |
333 | // } | 333 | // } |
334 | fn method_call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { | 334 | fn method_call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { |
335 | assert!(p.at(DOT) && p.nth(1).is_ident() && (p.nth(2) == L_PAREN || p.nth(2) == COLONCOLON)); | 335 | assert!(p.at(DOT) && p.nth(1) == IDENT && (p.nth(2) == L_PAREN || p.nth(2) == COLONCOLON)); |
336 | let m = lhs.precede(p); | 336 | let m = lhs.precede(p); |
337 | p.bump(); | 337 | p.bump(); |
338 | name_ref(p); | 338 | name_ref(p); |
@@ -352,7 +352,7 @@ fn field_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker { | |||
352 | assert!(p.at(DOT)); | 352 | assert!(p.at(DOT)); |
353 | let m = lhs.precede(p); | 353 | let m = lhs.precede(p); |
354 | p.bump(); | 354 | p.bump(); |
355 | if p.current().is_ident() { | 355 | if p.at(IDENT) { |
356 | name_ref(p) | 356 | name_ref(p) |
357 | } else if p.at(INT_NUMBER) { | 357 | } else if p.at(INT_NUMBER) { |
358 | p.bump() | 358 | p.bump() |
@@ -443,7 +443,7 @@ pub(crate) fn named_field_list(p: &mut Parser) { | |||
443 | p.bump(); | 443 | p.bump(); |
444 | while !p.at(EOF) && !p.at(R_CURLY) { | 444 | while !p.at(EOF) && !p.at(R_CURLY) { |
445 | match p.current() { | 445 | match p.current() { |
446 | IDENT | RAW_IDENT => { | 446 | IDENT => { |
447 | let m = p.start(); | 447 | let m = p.start(); |
448 | name_ref(p); | 448 | name_ref(p); |
449 | if p.eat(COLON) { | 449 | if p.eat(COLON) { |