aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/items
diff options
context:
space:
mode:
authorJosh Robson Chase <[email protected]>2019-01-23 18:14:34 +0000
committerJosh Robson Chase <[email protected]>2019-01-23 18:19:49 +0000
commit3b70acad0106e4ffe5ee68d565c9130b5b271e22 (patch)
tree72b32afb919c5317219c0891ced8c9725d622bbc /crates/ra_syntax/src/grammar/items
parent1cd6d6539a9d85bc44db364bb9165e6d9253790d (diff)
Use IDENT for both raw and normal idents
Diffstat (limited to 'crates/ra_syntax/src/grammar/items')
-rw-r--r--crates/ra_syntax/src/grammar/items/nominal.rs4
-rw-r--r--crates/ra_syntax/src/grammar/items/traits.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_syntax/src/grammar/items/nominal.rs b/crates/ra_syntax/src/grammar/items/nominal.rs
index 897306883..0784fb7b1 100644
--- a/crates/ra_syntax/src/grammar/items/nominal.rs
+++ b/crates/ra_syntax/src/grammar/items/nominal.rs
@@ -70,7 +70,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) {
70 } 70 }
71 let var = p.start(); 71 let var = p.start();
72 attributes::outer_attributes(p); 72 attributes::outer_attributes(p);
73 if p.current().is_ident() { 73 if p.at(IDENT) {
74 name(p); 74 name(p);
75 match p.current() { 75 match p.current() {
76 L_CURLY => named_field_def_list(p), 76 L_CURLY => named_field_def_list(p),
@@ -120,7 +120,7 @@ pub(crate) fn named_field_def_list(p: &mut Parser) {
120 // } 120 // }
121 attributes::outer_attributes(p); 121 attributes::outer_attributes(p);
122 opt_visibility(p); 122 opt_visibility(p);
123 if p.current().is_ident() { 123 if p.at(IDENT) {
124 name(p); 124 name(p);
125 p.expect(COLON); 125 p.expect(COLON);
126 types::type_(p); 126 types::type_(p);
diff --git a/crates/ra_syntax/src/grammar/items/traits.rs b/crates/ra_syntax/src/grammar/items/traits.rs
index a78bbba2b..0a0621753 100644
--- a/crates/ra_syntax/src/grammar/items/traits.rs
+++ b/crates/ra_syntax/src/grammar/items/traits.rs
@@ -112,7 +112,7 @@ fn choose_type_params_over_qpath(p: &Parser) -> bool {
112 if p.nth(1) == POUND || p.nth(1) == R_ANGLE { 112 if p.nth(1) == POUND || p.nth(1) == R_ANGLE {
113 return true; 113 return true;
114 } 114 }
115 (p.nth(1) == LIFETIME || p.nth(1).is_ident()) 115 (p.nth(1) == LIFETIME || p.nth(1) == IDENT)
116 && (p.nth(2) == R_ANGLE || p.nth(2) == COMMA || p.nth(2) == COLON || p.nth(2) == EQ) 116 && (p.nth(2) == R_ANGLE || p.nth(2) == COMMA || p.nth(2) == COLON || p.nth(2) == EQ)
117} 117}
118 118