aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/grammar/items
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 21:25:01 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-25 21:25:01 +0000
commit154ab4206d2fd9493a3665fb72f9bd710a577944 (patch)
treeb6d0912779ecb18ec278339d8a40303e172647be /crates/ra_syntax/src/grammar/items
parent3c7acecade09e1234ac7b1d1ed2f22edbc543f64 (diff)
parent23172a116c3cc4ca9a692dfdd05051d1a4aee2b2 (diff)
Merge #658
658: rename POS_FIELD -> POS_FIELD_DEF r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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}