diff options
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) { |