aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src/grammar/expressions.rs
diff options
context:
space:
mode:
authorEvgenii P <[email protected]>2019-08-09 10:08:36 +0100
committerEvgenii P <[email protected]>2019-08-09 10:08:36 +0100
commitfa24e20867893178ed7265ecadb2bcb09cf76dac (patch)
tree40db0d5e514bf1d260aa21a3a305b37986136481 /crates/ra_parser/src/grammar/expressions.rs
parent957b5ed23a4860fe3c9b80687a801b5d7870fe00 (diff)
Make name_ref to accept numeric names optionally
Diffstat (limited to 'crates/ra_parser/src/grammar/expressions.rs')
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs
index 50c938a23..9f9e9cb0e 100644
--- a/crates/ra_parser/src/grammar/expressions.rs
+++ b/crates/ra_parser/src/grammar/expressions.rs
@@ -458,7 +458,7 @@ fn method_call_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker {
458 assert!(p.at(T![.]) && p.nth(1) == IDENT && (p.nth(2) == T!['('] || p.nth(2) == T![::])); 458 assert!(p.at(T![.]) && p.nth(1) == IDENT && (p.nth(2) == T!['('] || p.nth(2) == T![::]));
459 let m = lhs.precede(p); 459 let m = lhs.precede(p);
460 p.bump(); 460 p.bump();
461 name_ref(p); 461 name_ref(p, false);
462 type_args::opt_type_arg_list(p, true); 462 type_args::opt_type_arg_list(p, true);
463 if p.at(T!['(']) { 463 if p.at(T!['(']) {
464 arg_list(p); 464 arg_list(p);
@@ -485,7 +485,7 @@ fn field_expr(p: &mut Parser, lhs: CompletedMarker) -> CompletedMarker {
485 let m = lhs.precede(p); 485 let m = lhs.precede(p);
486 p.bump(); 486 p.bump();
487 if p.at(IDENT) { 487 if p.at(IDENT) {
488 name_ref(p) 488 name_ref(p, false)
489 } else if p.at(INT_NUMBER) { 489 } else if p.at(INT_NUMBER) {
490 p.bump(); 490 p.bump();
491 } else if p.at(FLOAT_NUMBER) { 491 } else if p.at(FLOAT_NUMBER) {
@@ -587,7 +587,7 @@ pub(crate) fn named_field_list(p: &mut Parser) {
587 IDENT | INT_NUMBER | T![#] => { 587 IDENT | INT_NUMBER | T![#] => {
588 let m = p.start(); 588 let m = p.start();
589 attributes::outer_attributes(p); 589 attributes::outer_attributes(p);
590 name_ref(p); 590 name_ref(p, true);
591 if p.eat(T![:]) { 591 if p.eat(T![:]) {
592 expr(p); 592 expr(p);
593 } 593 }