diff options
author | Aleksey Kladov <[email protected]> | 2020-07-28 19:59:48 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-28 19:59:48 +0100 |
commit | b10e437039c2d7e300f6be6b5de6446419a2d660 (patch) | |
tree | c08df3e0cf61f1acecdefed66b88634988dc981a /crates/ra_parser/src/grammar | |
parent | eb99c35b3da43020df074b91243f6b51d792d116 (diff) |
Fix nameref parsing
Diffstat (limited to 'crates/ra_parser/src/grammar')
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 8 |
1 files changed, 7 insertions, 1 deletions
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); |