diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-28 16:19:56 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-28 16:19:56 +0000 |
commit | 2a770190b07ee43364a66a65b886f7efa822ec6f (patch) | |
tree | d1fb78ae2dc203ed39e3e50b8db27b2b9d1c363a /crates/ra_parser | |
parent | de56dba452006f6b1c7dc2f2264c77ec2bcf81f8 (diff) | |
parent | 7a06282d71d41508f30a9b7513eecfba998b9aa9 (diff) |
Merge #1070
1070: Support extern_crate_self r=matklad a=memoryruins
closes #1069
Co-authored-by: memoryruins <[email protected]>
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index e428faffb..b2ffeff8c 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs | |||
@@ -184,6 +184,10 @@ fn name_ref(p: &mut Parser) { | |||
184 | let m = p.start(); | 184 | let m = p.start(); |
185 | p.bump(); | 185 | p.bump(); |
186 | m.complete(p, NAME_REF); | 186 | m.complete(p, NAME_REF); |
187 | } else if p.at(SELF_KW) { | ||
188 | let m = p.start(); | ||
189 | p.bump(); | ||
190 | m.complete(p, SELF_KW); | ||
187 | } else { | 191 | } else { |
188 | p.err_and_bump("expected identifier"); | 192 | p.err_and_bump("expected identifier"); |
189 | } | 193 | } |