aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/items
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/grammar/items')
-rw-r--r--crates/ra_syntax/src/grammar/items/nominal.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/grammar/items/nominal.rs b/crates/ra_syntax/src/grammar/items/nominal.rs
index 0784fb7b1..ff9b38f9c 100644
--- a/crates/ra_syntax/src/grammar/items/nominal.rs
+++ b/crates/ra_syntax/src/grammar/items/nominal.rs
@@ -28,7 +28,7 @@ pub(super) fn struct_def(p: &mut Parser, kind: SyntaxKind) {
28 } 28 }
29 L_CURLY => named_field_def_list(p), 29 L_CURLY => named_field_def_list(p),
30 L_PAREN if kind == STRUCT_KW => { 30 L_PAREN if kind == STRUCT_KW => {
31 pos_field_list(p); 31 pos_field_def_list(p);
32 // test tuple_struct_where 32 // test tuple_struct_where
33 // struct Test<T>(T) where T: Clone; 33 // struct Test<T>(T) where T: Clone;
34 // struct Test<T>(T); 34 // struct Test<T>(T);
@@ -74,7 +74,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) {
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),
77 L_PAREN => pos_field_list(p), 77 L_PAREN => pos_field_def_list(p),
78 EQ => { 78 EQ => {
79 p.bump(); 79 p.bump();
80 expressions::expr(p); 80 expressions::expr(p);
@@ -132,7 +132,7 @@ pub(crate) fn named_field_def_list(p: &mut Parser) {
132 } 132 }
133} 133}
134 134
135fn pos_field_list(p: &mut Parser) { 135fn pos_field_def_list(p: &mut Parser) {
136 assert!(p.at(L_PAREN)); 136 assert!(p.at(L_PAREN));
137 let m = p.start(); 137 let m = p.start();
138 if !p.expect(L_PAREN) { 138 if !p.expect(L_PAREN) {
@@ -157,12 +157,12 @@ fn pos_field_list(p: &mut Parser) {
157 break; 157 break;
158 } 158 }
159 types::type_(p); 159 types::type_(p);
160 m.complete(p, POS_FIELD); 160 m.complete(p, POS_FIELD_DEF);
161 161
162 if !p.at(R_PAREN) { 162 if !p.at(R_PAREN) {
163 p.expect(COMMA); 163 p.expect(COMMA);
164 } 164 }
165 } 165 }
166 p.expect(R_PAREN); 166 p.expect(R_PAREN);
167 m.complete(p, POS_FIELD_LIST); 167 m.complete(p, POS_FIELD_DEF_LIST);
168} 168}