aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r--crates/ra_parser/src/grammar.rs4
-rw-r--r--crates/ra_parser/src/grammar/items.rs8
2 files changed, 7 insertions, 5 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs
index caedeead0..de2c98afd 100644
--- a/crates/ra_parser/src/grammar.rs
+++ b/crates/ra_parser/src/grammar.rs
@@ -270,10 +270,6 @@ fn name_ref(p: &mut Parser) {
270 let m = p.start(); 270 let m = p.start();
271 p.bump(IDENT); 271 p.bump(IDENT);
272 m.complete(p, NAME_REF); 272 m.complete(p, NAME_REF);
273 } else if p.at(T![self]) {
274 let m = p.start();
275 p.bump(T![self]);
276 m.complete(p, T![self]);
277 } else { 273 } else {
278 p.err_and_bump("expected identifier"); 274 p.err_and_bump("expected identifier");
279 } 275 }
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs
index 97642bc24..ffcdaaa99 100644
--- a/crates/ra_parser/src/grammar/items.rs
+++ b/crates/ra_parser/src/grammar/items.rs
@@ -304,7 +304,13 @@ fn extern_crate_item(p: &mut Parser, m: Marker) {
304 p.bump(T![extern]); 304 p.bump(T![extern]);
305 assert!(p.at(T![crate])); 305 assert!(p.at(T![crate]));
306 p.bump(T![crate]); 306 p.bump(T![crate]);
307 name_ref(p); 307
308 if p.at(T![self]) {
309 p.bump(T![self]);
310 } else {
311 name_ref(p);
312 }
313
308 opt_alias(p); 314 opt_alias(p);
309 p.expect(T![;]); 315 p.expect(T![;]);
310 m.complete(p, EXTERN_CRATE_ITEM); 316 m.complete(p, EXTERN_CRATE_ITEM);