diff options
Diffstat (limited to 'crates/ra_syntax')
13 files changed, 62 insertions, 62 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index 165b308d1..00c60ebf3 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs | |||
@@ -407,7 +407,7 @@ impl<'a, N: AstNode + 'a> Iterator for AstChildren<'a, N> { | |||
407 | 407 | ||
408 | #[derive(Debug, Clone, PartialEq, Eq)] | 408 | #[derive(Debug, Clone, PartialEq, Eq)] |
409 | pub enum StructFlavor<'a> { | 409 | pub enum StructFlavor<'a> { |
410 | Tuple(&'a PosFieldList), | 410 | Tuple(&'a PosFieldDefList), |
411 | Named(&'a NamedFieldDefList), | 411 | Named(&'a NamedFieldDefList), |
412 | Unit, | 412 | Unit, |
413 | } | 413 | } |
@@ -416,7 +416,7 @@ impl StructFlavor<'_> { | |||
416 | fn from_node<N: AstNode>(node: &N) -> StructFlavor { | 416 | fn from_node<N: AstNode>(node: &N) -> StructFlavor { |
417 | if let Some(nfdl) = child_opt::<_, NamedFieldDefList>(node) { | 417 | if let Some(nfdl) = child_opt::<_, NamedFieldDefList>(node) { |
418 | StructFlavor::Named(nfdl) | 418 | StructFlavor::Named(nfdl) |
419 | } else if let Some(pfl) = child_opt::<_, PosFieldList>(node) { | 419 | } else if let Some(pfl) = child_opt::<_, PosFieldDefList>(node) { |
420 | StructFlavor::Tuple(pfl) | 420 | StructFlavor::Tuple(pfl) |
421 | } else { | 421 | } else { |
422 | StructFlavor::Unit | 422 | StructFlavor::Unit |
diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index e936c2a6d..3ace6533c 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs | |||
@@ -2851,68 +2851,68 @@ impl PointerType { | |||
2851 | } | 2851 | } |
2852 | } | 2852 | } |
2853 | 2853 | ||
2854 | // PosField | 2854 | // PosFieldDef |
2855 | #[derive(Debug, PartialEq, Eq, Hash)] | 2855 | #[derive(Debug, PartialEq, Eq, Hash)] |
2856 | #[repr(transparent)] | 2856 | #[repr(transparent)] |
2857 | pub struct PosField { | 2857 | pub struct PosFieldDef { |
2858 | pub(crate) syntax: SyntaxNode, | 2858 | pub(crate) syntax: SyntaxNode, |
2859 | } | 2859 | } |
2860 | unsafe impl TransparentNewType for PosField { | 2860 | unsafe impl TransparentNewType for PosFieldDef { |
2861 | type Repr = rowan::SyntaxNode<RaTypes>; | 2861 | type Repr = rowan::SyntaxNode<RaTypes>; |
2862 | } | 2862 | } |
2863 | 2863 | ||
2864 | impl AstNode for PosField { | 2864 | impl AstNode for PosFieldDef { |
2865 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { | 2865 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { |
2866 | match syntax.kind() { | 2866 | match syntax.kind() { |
2867 | POS_FIELD => Some(PosField::from_repr(syntax.into_repr())), | 2867 | POS_FIELD_DEF => Some(PosFieldDef::from_repr(syntax.into_repr())), |
2868 | _ => None, | 2868 | _ => None, |
2869 | } | 2869 | } |
2870 | } | 2870 | } |
2871 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2871 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2872 | } | 2872 | } |
2873 | 2873 | ||
2874 | impl ToOwned for PosField { | 2874 | impl ToOwned for PosFieldDef { |
2875 | type Owned = TreeArc<PosField>; | 2875 | type Owned = TreeArc<PosFieldDef>; |
2876 | fn to_owned(&self) -> TreeArc<PosField> { TreeArc::cast(self.syntax.to_owned()) } | 2876 | fn to_owned(&self) -> TreeArc<PosFieldDef> { TreeArc::cast(self.syntax.to_owned()) } |
2877 | } | 2877 | } |
2878 | 2878 | ||
2879 | 2879 | ||
2880 | impl ast::VisibilityOwner for PosField {} | 2880 | impl ast::VisibilityOwner for PosFieldDef {} |
2881 | impl ast::AttrsOwner for PosField {} | 2881 | impl ast::AttrsOwner for PosFieldDef {} |
2882 | impl PosField { | 2882 | impl PosFieldDef { |
2883 | pub fn type_ref(&self) -> Option<&TypeRef> { | 2883 | pub fn type_ref(&self) -> Option<&TypeRef> { |
2884 | super::child_opt(self) | 2884 | super::child_opt(self) |
2885 | } | 2885 | } |
2886 | } | 2886 | } |
2887 | 2887 | ||
2888 | // PosFieldList | 2888 | // PosFieldDefList |
2889 | #[derive(Debug, PartialEq, Eq, Hash)] | 2889 | #[derive(Debug, PartialEq, Eq, Hash)] |
2890 | #[repr(transparent)] | 2890 | #[repr(transparent)] |
2891 | pub struct PosFieldList { | 2891 | pub struct PosFieldDefList { |
2892 | pub(crate) syntax: SyntaxNode, | 2892 | pub(crate) syntax: SyntaxNode, |
2893 | } | 2893 | } |
2894 | unsafe impl TransparentNewType for PosFieldList { | 2894 | unsafe impl TransparentNewType for PosFieldDefList { |
2895 | type Repr = rowan::SyntaxNode<RaTypes>; | 2895 | type Repr = rowan::SyntaxNode<RaTypes>; |
2896 | } | 2896 | } |
2897 | 2897 | ||
2898 | impl AstNode for PosFieldList { | 2898 | impl AstNode for PosFieldDefList { |
2899 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { | 2899 | fn cast(syntax: &SyntaxNode) -> Option<&Self> { |
2900 | match syntax.kind() { | 2900 | match syntax.kind() { |
2901 | POS_FIELD_LIST => Some(PosFieldList::from_repr(syntax.into_repr())), | 2901 | POS_FIELD_DEF_LIST => Some(PosFieldDefList::from_repr(syntax.into_repr())), |
2902 | _ => None, | 2902 | _ => None, |
2903 | } | 2903 | } |
2904 | } | 2904 | } |
2905 | fn syntax(&self) -> &SyntaxNode { &self.syntax } | 2905 | fn syntax(&self) -> &SyntaxNode { &self.syntax } |
2906 | } | 2906 | } |
2907 | 2907 | ||
2908 | impl ToOwned for PosFieldList { | 2908 | impl ToOwned for PosFieldDefList { |
2909 | type Owned = TreeArc<PosFieldList>; | 2909 | type Owned = TreeArc<PosFieldDefList>; |
2910 | fn to_owned(&self) -> TreeArc<PosFieldList> { TreeArc::cast(self.syntax.to_owned()) } | 2910 | fn to_owned(&self) -> TreeArc<PosFieldDefList> { TreeArc::cast(self.syntax.to_owned()) } |
2911 | } | 2911 | } |
2912 | 2912 | ||
2913 | 2913 | ||
2914 | impl PosFieldList { | 2914 | impl PosFieldDefList { |
2915 | pub fn fields(&self) -> impl Iterator<Item = &PosField> { | 2915 | pub fn fields(&self) -> impl Iterator<Item = &PosFieldDef> { |
2916 | super::children(self) | 2916 | super::children(self) |
2917 | } | 2917 | } |
2918 | } | 2918 | } |
diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index a92d9bbda..85fc79038 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron | |||
@@ -205,8 +205,8 @@ Grammar( | |||
205 | "ENUM_VARIANT", | 205 | "ENUM_VARIANT", |
206 | "NAMED_FIELD_DEF_LIST", | 206 | "NAMED_FIELD_DEF_LIST", |
207 | "NAMED_FIELD_DEF", | 207 | "NAMED_FIELD_DEF", |
208 | "POS_FIELD_LIST", | 208 | "POS_FIELD_DEF_LIST", |
209 | "POS_FIELD", | 209 | "POS_FIELD_DEF", |
210 | "ENUM_VARIANT_LIST", | 210 | "ENUM_VARIANT_LIST", |
211 | "ITEM_LIST", | 211 | "ITEM_LIST", |
212 | "ATTR", | 212 | "ATTR", |
@@ -269,8 +269,8 @@ Grammar( | |||
269 | ), | 269 | ), |
270 | "NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]), | 270 | "NamedFieldDefList": (collections: [["fields", "NamedFieldDef"]]), |
271 | "NamedFieldDef": ( traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner"], options: ["TypeRef"] ), | 271 | "NamedFieldDef": ( traits: ["VisibilityOwner", "NameOwner", "AttrsOwner", "DocCommentsOwner"], options: ["TypeRef"] ), |
272 | "PosFieldList": (collections: [["fields", "PosField"]]), | 272 | "PosFieldDefList": (collections: [["fields", "PosFieldDef"]]), |
273 | "PosField": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), | 273 | "PosFieldDef": ( traits: ["VisibilityOwner", "AttrsOwner"], options: ["TypeRef"]), |
274 | "EnumDef": ( traits: [ | 274 | "EnumDef": ( traits: [ |
275 | "VisibilityOwner", | 275 | "VisibilityOwner", |
276 | "NameOwner", | 276 | "NameOwner", |
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 | ||
135 | fn pos_field_list(p: &mut Parser) { | 135 | fn 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 | } |
diff --git a/crates/ra_syntax/src/syntax_kinds/generated.rs b/crates/ra_syntax/src/syntax_kinds/generated.rs index 06faf7557..14f610891 100644 --- a/crates/ra_syntax/src/syntax_kinds/generated.rs +++ b/crates/ra_syntax/src/syntax_kinds/generated.rs | |||
@@ -195,8 +195,8 @@ pub enum SyntaxKind { | |||
195 | ENUM_VARIANT, | 195 | ENUM_VARIANT, |
196 | NAMED_FIELD_DEF_LIST, | 196 | NAMED_FIELD_DEF_LIST, |
197 | NAMED_FIELD_DEF, | 197 | NAMED_FIELD_DEF, |
198 | POS_FIELD_LIST, | 198 | POS_FIELD_DEF_LIST, |
199 | POS_FIELD, | 199 | POS_FIELD_DEF, |
200 | ENUM_VARIANT_LIST, | 200 | ENUM_VARIANT_LIST, |
201 | ITEM_LIST, | 201 | ITEM_LIST, |
202 | ATTR, | 202 | ATTR, |
@@ -458,8 +458,8 @@ impl SyntaxKind { | |||
458 | ENUM_VARIANT => &SyntaxInfo { name: "ENUM_VARIANT" }, | 458 | ENUM_VARIANT => &SyntaxInfo { name: "ENUM_VARIANT" }, |
459 | NAMED_FIELD_DEF_LIST => &SyntaxInfo { name: "NAMED_FIELD_DEF_LIST" }, | 459 | NAMED_FIELD_DEF_LIST => &SyntaxInfo { name: "NAMED_FIELD_DEF_LIST" }, |
460 | NAMED_FIELD_DEF => &SyntaxInfo { name: "NAMED_FIELD_DEF" }, | 460 | NAMED_FIELD_DEF => &SyntaxInfo { name: "NAMED_FIELD_DEF" }, |
461 | POS_FIELD_LIST => &SyntaxInfo { name: "POS_FIELD_LIST" }, | 461 | POS_FIELD_DEF_LIST => &SyntaxInfo { name: "POS_FIELD_DEF_LIST" }, |
462 | POS_FIELD => &SyntaxInfo { name: "POS_FIELD" }, | 462 | POS_FIELD_DEF => &SyntaxInfo { name: "POS_FIELD_DEF" }, |
463 | ENUM_VARIANT_LIST => &SyntaxInfo { name: "ENUM_VARIANT_LIST" }, | 463 | ENUM_VARIANT_LIST => &SyntaxInfo { name: "ENUM_VARIANT_LIST" }, |
464 | ITEM_LIST => &SyntaxInfo { name: "ITEM_LIST" }, | 464 | ITEM_LIST => &SyntaxInfo { name: "ITEM_LIST" }, |
465 | ATTR => &SyntaxInfo { name: "ATTR" }, | 465 | ATTR => &SyntaxInfo { name: "ATTR" }, |
diff --git a/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.txt b/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.txt index 83d716b2f..1ec15194c 100644 --- a/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.txt +++ b/crates/ra_syntax/tests/data/parser/err/0013_invalid_type.txt | |||
@@ -7,10 +7,10 @@ SOURCE_FILE@[0; 86) | |||
7 | WHITESPACE@[10; 11) | 7 | WHITESPACE@[10; 11) |
8 | NAME@[11; 16) | 8 | NAME@[11; 16) |
9 | IDENT@[11; 16) "Cache" | 9 | IDENT@[11; 16) "Cache" |
10 | POS_FIELD_LIST@[16; 72) | 10 | POS_FIELD_DEF_LIST@[16; 72) |
11 | L_PAREN@[16; 17) | 11 | L_PAREN@[16; 17) |
12 | WHITESPACE@[17; 22) | 12 | WHITESPACE@[17; 22) |
13 | POS_FIELD@[22; 68) | 13 | POS_FIELD_DEF@[22; 68) |
14 | PATH_TYPE@[22; 68) | 14 | PATH_TYPE@[22; 68) |
15 | PATH@[22; 68) | 15 | PATH@[22; 68) |
16 | PATH_SEGMENT@[22; 68) | 16 | PATH_SEGMENT@[22; 68) |
@@ -55,7 +55,7 @@ SOURCE_FILE@[0; 86) | |||
55 | err: `expected R_ANGLE` | 55 | err: `expected R_ANGLE` |
56 | err: `expected COMMA` | 56 | err: `expected COMMA` |
57 | WHITESPACE@[68; 69) | 57 | WHITESPACE@[68; 69) |
58 | POS_FIELD@[69; 72) | 58 | POS_FIELD_DEF@[69; 72) |
59 | PATH_TYPE@[69; 72) | 59 | PATH_TYPE@[69; 72) |
60 | PATH@[69; 72) | 60 | PATH@[69; 72) |
61 | PATH_SEGMENT@[69; 72) | 61 | PATH_SEGMENT@[69; 72) |
diff --git a/crates/ra_syntax/tests/data/parser/err/0025_nope.txt b/crates/ra_syntax/tests/data/parser/err/0025_nope.txt index 615064f77..e0824ca56 100644 --- a/crates/ra_syntax/tests/data/parser/err/0025_nope.txt +++ b/crates/ra_syntax/tests/data/parser/err/0025_nope.txt | |||
@@ -28,9 +28,9 @@ SOURCE_FILE@[0; 575) | |||
28 | ENUM_VARIANT@[50; 62) | 28 | ENUM_VARIANT@[50; 62) |
29 | NAME@[50; 54) | 29 | NAME@[50; 54) |
30 | IDENT@[50; 54) "Var2" | 30 | IDENT@[50; 54) "Var2" |
31 | POS_FIELD_LIST@[54; 62) | 31 | POS_FIELD_DEF_LIST@[54; 62) |
32 | L_PAREN@[54; 55) | 32 | L_PAREN@[54; 55) |
33 | POS_FIELD@[55; 61) | 33 | POS_FIELD_DEF@[55; 61) |
34 | PATH_TYPE@[55; 61) | 34 | PATH_TYPE@[55; 61) |
35 | PATH@[55; 61) | 35 | PATH@[55; 61) |
36 | PATH_SEGMENT@[55; 61) | 36 | PATH_SEGMENT@[55; 61) |
@@ -151,9 +151,9 @@ SOURCE_FILE@[0; 575) | |||
151 | ENUM_VARIANT@[363; 372) | 151 | ENUM_VARIANT@[363; 372) |
152 | NAME@[363; 367) | 152 | NAME@[363; 367) |
153 | IDENT@[363; 367) "Nope" | 153 | IDENT@[363; 367) "Nope" |
154 | POS_FIELD_LIST@[367; 372) | 154 | POS_FIELD_DEF_LIST@[367; 372) |
155 | L_PAREN@[367; 368) | 155 | L_PAREN@[367; 368) |
156 | POS_FIELD@[368; 371) | 156 | POS_FIELD_DEF@[368; 371) |
157 | PATH_TYPE@[368; 371) | 157 | PATH_TYPE@[368; 371) |
158 | PATH@[368; 371) | 158 | PATH@[368; 371) |
159 | PATH_SEGMENT@[368; 371) | 159 | PATH_SEGMENT@[368; 371) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.txt index 058639375..6247729f6 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0083_struct_items.txt | |||
@@ -21,7 +21,7 @@ SOURCE_FILE@[0; 106) | |||
21 | WHITESPACE@[32; 33) | 21 | WHITESPACE@[32; 33) |
22 | NAME@[33; 36) | 22 | NAME@[33; 36) |
23 | IDENT@[33; 36) "Foo" | 23 | IDENT@[33; 36) "Foo" |
24 | POS_FIELD_LIST@[36; 38) | 24 | POS_FIELD_DEF_LIST@[36; 38) |
25 | L_PAREN@[36; 37) | 25 | L_PAREN@[36; 37) |
26 | R_PAREN@[37; 38) | 26 | R_PAREN@[37; 38) |
27 | SEMI@[38; 39) | 27 | SEMI@[38; 39) |
@@ -31,9 +31,9 @@ SOURCE_FILE@[0; 106) | |||
31 | WHITESPACE@[46; 47) | 31 | WHITESPACE@[46; 47) |
32 | NAME@[47; 50) | 32 | NAME@[47; 50) |
33 | IDENT@[47; 50) "Foo" | 33 | IDENT@[47; 50) "Foo" |
34 | POS_FIELD_LIST@[50; 65) | 34 | POS_FIELD_DEF_LIST@[50; 65) |
35 | L_PAREN@[50; 51) | 35 | L_PAREN@[50; 51) |
36 | POS_FIELD@[51; 57) | 36 | POS_FIELD_DEF@[51; 57) |
37 | PATH_TYPE@[51; 57) | 37 | PATH_TYPE@[51; 57) |
38 | PATH@[51; 57) | 38 | PATH@[51; 57) |
39 | PATH_SEGMENT@[51; 57) | 39 | PATH_SEGMENT@[51; 57) |
@@ -41,7 +41,7 @@ SOURCE_FILE@[0; 106) | |||
41 | IDENT@[51; 57) "String" | 41 | IDENT@[51; 57) "String" |
42 | COMMA@[57; 58) | 42 | COMMA@[57; 58) |
43 | WHITESPACE@[58; 59) | 43 | WHITESPACE@[58; 59) |
44 | POS_FIELD@[59; 64) | 44 | POS_FIELD_DEF@[59; 64) |
45 | PATH_TYPE@[59; 64) | 45 | PATH_TYPE@[59; 64) |
46 | PATH@[59; 64) | 46 | PATH@[59; 64) |
47 | PATH_SEGMENT@[59; 64) | 47 | PATH_SEGMENT@[59; 64) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt index b7de83072..4f439f21c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0114_tuple_struct_where.txt | |||
@@ -10,9 +10,9 @@ SOURCE_FILE@[0; 53) | |||
10 | NAME@[12; 13) | 10 | NAME@[12; 13) |
11 | IDENT@[12; 13) "T" | 11 | IDENT@[12; 13) "T" |
12 | R_ANGLE@[13; 14) | 12 | R_ANGLE@[13; 14) |
13 | POS_FIELD_LIST@[14; 17) | 13 | POS_FIELD_DEF_LIST@[14; 17) |
14 | L_PAREN@[14; 15) | 14 | L_PAREN@[14; 15) |
15 | POS_FIELD@[15; 16) | 15 | POS_FIELD_DEF@[15; 16) |
16 | PATH_TYPE@[15; 16) | 16 | PATH_TYPE@[15; 16) |
17 | PATH@[15; 16) | 17 | PATH@[15; 16) |
18 | PATH_SEGMENT@[15; 16) | 18 | PATH_SEGMENT@[15; 16) |
@@ -49,9 +49,9 @@ SOURCE_FILE@[0; 53) | |||
49 | NAME@[46; 47) | 49 | NAME@[46; 47) |
50 | IDENT@[46; 47) "T" | 50 | IDENT@[46; 47) "T" |
51 | R_ANGLE@[47; 48) | 51 | R_ANGLE@[47; 48) |
52 | POS_FIELD_LIST@[48; 51) | 52 | POS_FIELD_DEF_LIST@[48; 51) |
53 | L_PAREN@[48; 49) | 53 | L_PAREN@[48; 49) |
54 | POS_FIELD@[49; 50) | 54 | POS_FIELD_DEF@[49; 50) |
55 | PATH_TYPE@[49; 50) | 55 | PATH_TYPE@[49; 50) |
56 | PATH@[49; 50) | 56 | PATH@[49; 50) |
57 | PATH_SEGMENT@[49; 50) | 57 | PATH_SEGMENT@[49; 50) |
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.txt index 99ec0755b..4da84ba48 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0115_pos_field_attrs.txt | |||
@@ -5,10 +5,10 @@ SOURCE_FILE@[0; 60) | |||
5 | NAME@[7; 8) | 5 | NAME@[7; 8) |
6 | IDENT@[7; 8) "S" | 6 | IDENT@[7; 8) "S" |
7 | WHITESPACE@[8; 9) | 7 | WHITESPACE@[8; 9) |
8 | POS_FIELD_LIST@[9; 58) | 8 | POS_FIELD_DEF_LIST@[9; 58) |
9 | L_PAREN@[9; 10) | 9 | L_PAREN@[9; 10) |
10 | WHITESPACE@[10; 15) | 10 | WHITESPACE@[10; 15) |
11 | POS_FIELD@[15; 55) | 11 | POS_FIELD_DEF@[15; 55) |
12 | ATTR@[15; 43) | 12 | ATTR@[15; 43) |
13 | POUND@[15; 16) | 13 | POUND@[15; 16) |
14 | TOKEN_TREE@[16; 43) | 14 | TOKEN_TREE@[16; 43) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.txt b/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.txt index 1d355823d..d021d6de6 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0016_struct_flavors.txt | |||
@@ -21,7 +21,7 @@ SOURCE_FILE@[0; 97) | |||
21 | WHITESPACE@[28; 29) | 21 | WHITESPACE@[28; 29) |
22 | NAME@[29; 30) | 22 | NAME@[29; 30) |
23 | IDENT@[29; 30) "C" | 23 | IDENT@[29; 30) "C" |
24 | POS_FIELD_LIST@[30; 32) | 24 | POS_FIELD_DEF_LIST@[30; 32) |
25 | L_PAREN@[30; 31) | 25 | L_PAREN@[30; 31) |
26 | R_PAREN@[31; 32) | 26 | R_PAREN@[31; 32) |
27 | SEMI@[32; 33) | 27 | SEMI@[32; 33) |
@@ -68,9 +68,9 @@ SOURCE_FILE@[0; 97) | |||
68 | WHITESPACE@[82; 83) | 68 | WHITESPACE@[82; 83) |
69 | NAME@[83; 84) | 69 | NAME@[83; 84) |
70 | IDENT@[83; 84) "E" | 70 | IDENT@[83; 84) "E" |
71 | POS_FIELD_LIST@[84; 95) | 71 | POS_FIELD_DEF_LIST@[84; 95) |
72 | L_PAREN@[84; 85) | 72 | L_PAREN@[84; 85) |
73 | POS_FIELD@[85; 90) | 73 | POS_FIELD_DEF@[85; 90) |
74 | VISIBILITY@[85; 88) | 74 | VISIBILITY@[85; 88) |
75 | PUB_KW@[85; 88) | 75 | PUB_KW@[85; 88) |
76 | WHITESPACE@[88; 89) | 76 | WHITESPACE@[88; 89) |
@@ -81,7 +81,7 @@ SOURCE_FILE@[0; 97) | |||
81 | IDENT@[89; 90) "x" | 81 | IDENT@[89; 90) "x" |
82 | COMMA@[90; 91) | 82 | COMMA@[90; 91) |
83 | WHITESPACE@[91; 92) | 83 | WHITESPACE@[91; 92) |
84 | POS_FIELD@[92; 93) | 84 | POS_FIELD_DEF@[92; 93) |
85 | PATH_TYPE@[92; 93) | 85 | PATH_TYPE@[92; 93) |
86 | PATH@[92; 93) | 86 | PATH@[92; 93) |
87 | PATH_SEGMENT@[92; 93) | 87 | PATH_SEGMENT@[92; 93) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.txt b/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.txt index 491d154df..05480c81b 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0018_struct_type_params.txt | |||
@@ -23,9 +23,9 @@ SOURCE_FILE@[0; 290) | |||
23 | NAME@[24; 25) | 23 | NAME@[24; 25) |
24 | IDENT@[24; 25) "T" | 24 | IDENT@[24; 25) "T" |
25 | R_ANGLE@[25; 26) | 25 | R_ANGLE@[25; 26) |
26 | POS_FIELD_LIST@[26; 31) | 26 | POS_FIELD_DEF_LIST@[26; 31) |
27 | L_PAREN@[26; 27) | 27 | L_PAREN@[26; 27) |
28 | POS_FIELD@[27; 30) | 28 | POS_FIELD_DEF@[27; 30) |
29 | PATH_TYPE@[27; 30) | 29 | PATH_TYPE@[27; 30) |
30 | PATH@[27; 30) | 30 | PATH@[27; 30) |
31 | PATH_SEGMENT@[27; 30) | 31 | PATH_SEGMENT@[27; 30) |
diff --git a/crates/ra_syntax/tests/data/parser/ok/0019_enums.txt b/crates/ra_syntax/tests/data/parser/ok/0019_enums.txt index 6925219e8..2ac55cfbc 100644 --- a/crates/ra_syntax/tests/data/parser/ok/0019_enums.txt +++ b/crates/ra_syntax/tests/data/parser/ok/0019_enums.txt | |||
@@ -131,9 +131,9 @@ SOURCE_FILE@[0; 182) | |||
131 | ENUM_VARIANT@[162; 169) | 131 | ENUM_VARIANT@[162; 169) |
132 | NAME@[162; 163) | 132 | NAME@[162; 163) |
133 | IDENT@[162; 163) "D" | 133 | IDENT@[162; 163) "D" |
134 | POS_FIELD_LIST@[163; 169) | 134 | POS_FIELD_DEF_LIST@[163; 169) |
135 | L_PAREN@[163; 164) | 135 | L_PAREN@[163; 164) |
136 | POS_FIELD@[164; 167) | 136 | POS_FIELD_DEF@[164; 167) |
137 | PATH_TYPE@[164; 167) | 137 | PATH_TYPE@[164; 167) |
138 | PATH@[164; 167) | 138 | PATH@[164; 167) |
139 | PATH_SEGMENT@[164; 167) | 139 | PATH_SEGMENT@[164; 167) |
@@ -146,7 +146,7 @@ SOURCE_FILE@[0; 182) | |||
146 | ENUM_VARIANT@[175; 178) | 146 | ENUM_VARIANT@[175; 178) |
147 | NAME@[175; 176) | 147 | NAME@[175; 176) |
148 | IDENT@[175; 176) "E" | 148 | IDENT@[175; 176) "E" |
149 | POS_FIELD_LIST@[176; 178) | 149 | POS_FIELD_DEF_LIST@[176; 178) |
150 | L_PAREN@[176; 177) | 150 | L_PAREN@[176; 177) |
151 | R_PAREN@[177; 178) | 151 | R_PAREN@[177; 178) |
152 | COMMA@[178; 179) | 152 | COMMA@[178; 179) |