diff options
author | Benjamin Coenen <[email protected]> | 2020-04-14 18:20:30 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-14 18:20:30 +0100 |
commit | b092bbc83d13af6a79f8f282632ec1ea0a1560bd (patch) | |
tree | 2638559990ee6a93cd3b6d6d957b67063eb75c2d /crates/ra_parser/src/grammar.rs | |
parent | 064095742980d4c825391f643e437520599f51d8 (diff) | |
parent | c82e7696e6f86cc0843c5aab9f09b5d6dd0d4bac (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_parser/src/grammar.rs')
-rw-r--r-- | crates/ra_parser/src/grammar.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index d0530955e..c2a6e82e9 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs | |||
@@ -282,13 +282,10 @@ fn name_ref(p: &mut Parser) { | |||
282 | } | 282 | } |
283 | 283 | ||
284 | fn name_ref_or_index(p: &mut Parser) { | 284 | fn name_ref_or_index(p: &mut Parser) { |
285 | if p.at(IDENT) || p.at(INT_NUMBER) { | 285 | assert!(p.at(IDENT) || p.at(INT_NUMBER)); |
286 | let m = p.start(); | 286 | let m = p.start(); |
287 | p.bump_any(); | 287 | p.bump_any(); |
288 | m.complete(p, NAME_REF); | 288 | m.complete(p, NAME_REF); |
289 | } else { | ||
290 | p.err_and_bump("expected identifier"); | ||
291 | } | ||
292 | } | 289 | } |
293 | 290 | ||
294 | fn error_block(p: &mut Parser, message: &str) { | 291 | fn error_block(p: &mut Parser, message: &str) { |