aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/items.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar/items.rs')
-rw-r--r--crates/ra_syntax/src/grammar/items.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/grammar/items.rs b/crates/ra_syntax/src/grammar/items.rs
index 265e84570..c49798444 100644
--- a/crates/ra_syntax/src/grammar/items.rs
+++ b/crates/ra_syntax/src/grammar/items.rs
@@ -99,11 +99,11 @@ pub(super) fn maybe_item(p: &mut Parser, flavor: ItemFlavor) -> MaybeItem {
99 has_mods = true; 99 has_mods = true;
100 abi(p); 100 abi(p);
101 } 101 }
102 if p.at(IDENT) && p.at_contextual_kw("auto") && p.nth(1) == TRAIT_KW { 102 if p.current().is_ident() && p.at_contextual_kw("auto") && p.nth(1) == TRAIT_KW {
103 p.bump_remap(AUTO_KW); 103 p.bump_remap(AUTO_KW);
104 has_mods = true; 104 has_mods = true;
105 } 105 }
106 if p.at(IDENT) && p.at_contextual_kw("default") && p.nth(1) == IMPL_KW { 106 if p.current().is_ident() && p.at_contextual_kw("default") && p.nth(1) == IMPL_KW {
107 p.bump_remap(DEFAULT_KW); 107 p.bump_remap(DEFAULT_KW);
108 has_mods = true; 108 has_mods = true;
109 } 109 }
@@ -202,7 +202,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> {
202 } 202 }
203 STRUCT_DEF 203 STRUCT_DEF
204 } 204 }
205 IDENT if p.at_contextual_kw("union") && p.nth(1) == IDENT => { 205 IDENT | RAW_IDENT if p.at_contextual_kw("union") && p.nth(1).is_ident() => {
206 // test union_items 206 // test union_items
207 // union Foo {} 207 // union Foo {}
208 // union Foo { 208 // union Foo {
@@ -220,7 +220,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> {
220 use_item::use_item(p); 220 use_item::use_item(p);
221 USE_ITEM 221 USE_ITEM
222 } 222 }
223 CONST_KW if (la == IDENT || la == MUT_KW) => { 223 CONST_KW if (la.is_ident() || la == MUT_KW) => {
224 consts::const_def(p); 224 consts::const_def(p);
225 CONST_DEF 225 CONST_DEF
226 } 226 }
@@ -351,7 +351,7 @@ fn macro_call(p: &mut Parser) -> BlockLike {
351 351
352pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike { 352pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike {
353 p.expect(EXCL); 353 p.expect(EXCL);
354 p.eat(IDENT); 354 p.eat_one(&[IDENT, RAW_IDENT]);
355 match p.current() { 355 match p.current() {
356 L_CURLY => { 356 L_CURLY => {
357 token_tree(p); 357 token_tree(p);