diff options
Diffstat (limited to 'crates/ra_parser/src')
-rw-r--r-- | crates/ra_parser/src/grammar.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 14 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 2 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/nominal.rs | 30 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/patterns.rs | 65 | ||||
-rw-r--r-- | crates/ra_parser/src/syntax_kind/generated.rs | 21 |
7 files changed, 75 insertions, 65 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index beedac457..dee3a229d 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs | |||
@@ -150,8 +150,8 @@ pub(crate) fn reparser( | |||
150 | ) -> Option<fn(&mut Parser)> { | 150 | ) -> Option<fn(&mut Parser)> { |
151 | let res = match node { | 151 | let res = match node { |
152 | BLOCK => expressions::block, | 152 | BLOCK => expressions::block, |
153 | NAMED_FIELD_DEF_LIST => items::named_field_def_list, | 153 | RECORD_FIELD_DEF_LIST => items::record_field_def_list, |
154 | NAMED_FIELD_LIST => items::named_field_list, | 154 | RECORD_FIELD_LIST => items::record_field_list, |
155 | ENUM_VARIANT_LIST => items::enum_variant_list, | 155 | ENUM_VARIANT_LIST => items::enum_variant_list, |
156 | MATCH_ARM_LIST => items::match_arm_list, | 156 | MATCH_ARM_LIST => items::match_arm_list, |
157 | USE_TREE_LIST => items::use_tree_list, | 157 | USE_TREE_LIST => items::use_tree_list, |
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 0495f34ae..783d6a6f0 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -559,8 +559,8 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) { | |||
559 | paths::expr_path(p); | 559 | paths::expr_path(p); |
560 | match p.current() { | 560 | match p.current() { |
561 | T!['{'] if !r.forbid_structs => { | 561 | T!['{'] if !r.forbid_structs => { |
562 | named_field_list(p); | 562 | record_field_list(p); |
563 | (m.complete(p, STRUCT_LIT), BlockLike::NotBlock) | 563 | (m.complete(p, RECORD_LIT), BlockLike::NotBlock) |
564 | } | 564 | } |
565 | T![!] => { | 565 | T![!] => { |
566 | let block_like = items::macro_call_after_excl(p); | 566 | let block_like = items::macro_call_after_excl(p); |
@@ -570,20 +570,20 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) { | |||
570 | } | 570 | } |
571 | } | 571 | } |
572 | 572 | ||
573 | // test struct_lit | 573 | // test record_lit |
574 | // fn foo() { | 574 | // fn foo() { |
575 | // S {}; | 575 | // S {}; |
576 | // S { x, y: 32, }; | 576 | // S { x, y: 32, }; |
577 | // S { x, y: 32, ..Default::default() }; | 577 | // S { x, y: 32, ..Default::default() }; |
578 | // TupleStruct { 0: 1 }; | 578 | // TupleStruct { 0: 1 }; |
579 | // } | 579 | // } |
580 | pub(crate) fn named_field_list(p: &mut Parser) { | 580 | pub(crate) fn record_field_list(p: &mut Parser) { |
581 | assert!(p.at(T!['{'])); | 581 | assert!(p.at(T!['{'])); |
582 | let m = p.start(); | 582 | let m = p.start(); |
583 | p.bump(); | 583 | p.bump(); |
584 | while !p.at(EOF) && !p.at(T!['}']) { | 584 | while !p.at(EOF) && !p.at(T!['}']) { |
585 | match p.current() { | 585 | match p.current() { |
586 | // test struct_literal_field_with_attr | 586 | // test record_literal_field_with_attr |
587 | // fn main() { | 587 | // fn main() { |
588 | // S { #[cfg(test)] field: 1 } | 588 | // S { #[cfg(test)] field: 1 } |
589 | // } | 589 | // } |
@@ -594,7 +594,7 @@ pub(crate) fn named_field_list(p: &mut Parser) { | |||
594 | if p.eat(T![:]) { | 594 | if p.eat(T![:]) { |
595 | expr(p); | 595 | expr(p); |
596 | } | 596 | } |
597 | m.complete(p, NAMED_FIELD); | 597 | m.complete(p, RECORD_FIELD); |
598 | } | 598 | } |
599 | T![..] => { | 599 | T![..] => { |
600 | p.bump(); | 600 | p.bump(); |
@@ -608,5 +608,5 @@ pub(crate) fn named_field_list(p: &mut Parser) { | |||
608 | } | 608 | } |
609 | } | 609 | } |
610 | p.expect(T!['}']); | 610 | p.expect(T!['}']); |
611 | m.complete(p, NAMED_FIELD_LIST); | 611 | m.complete(p, RECORD_FIELD_LIST); |
612 | } | 612 | } |
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index ab8fb9f6e..bc942ae01 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -414,8 +414,6 @@ pub(crate) fn match_arm_list(p: &mut Parser) { | |||
414 | // X | Y if Z => (), | 414 | // X | Y if Z => (), |
415 | // | X | Y if Z => (), | 415 | // | X | Y if Z => (), |
416 | // | X => (), | 416 | // | X => (), |
417 | // box X => (), | ||
418 | // Some(box X) => (), | ||
419 | // }; | 417 | // }; |
420 | // } | 418 | // } |
421 | fn match_arm(p: &mut Parser) -> BlockLike { | 419 | fn match_arm(p: &mut Parser) -> BlockLike { |
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index b7da44758..6d426206e 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs | |||
@@ -4,8 +4,8 @@ mod traits; | |||
4 | mod use_item; | 4 | mod use_item; |
5 | 5 | ||
6 | pub(crate) use self::{ | 6 | pub(crate) use self::{ |
7 | expressions::{match_arm_list, named_field_list}, | 7 | expressions::{match_arm_list, record_field_list}, |
8 | nominal::{enum_variant_list, named_field_def_list}, | 8 | nominal::{enum_variant_list, record_field_def_list}, |
9 | traits::{impl_item_list, trait_item_list}, | 9 | traits::{impl_item_list, trait_item_list}, |
10 | use_item::use_tree_list, | 10 | use_item::use_tree_list, |
11 | }; | 11 | }; |
diff --git a/crates/ra_parser/src/grammar/items/nominal.rs b/crates/ra_parser/src/grammar/items/nominal.rs index bd4edab89..54f02c7c9 100644 --- a/crates/ra_parser/src/grammar/items/nominal.rs +++ b/crates/ra_parser/src/grammar/items/nominal.rs | |||
@@ -13,7 +13,7 @@ pub(super) fn struct_def(p: &mut Parser, m: Marker, kind: SyntaxKind) { | |||
13 | T![;] => { | 13 | T![;] => { |
14 | p.bump(); | 14 | p.bump(); |
15 | } | 15 | } |
16 | T!['{'] => named_field_def_list(p), | 16 | T!['{'] => record_field_def_list(p), |
17 | _ => { | 17 | _ => { |
18 | //FIXME: special case `(` error message | 18 | //FIXME: special case `(` error message |
19 | p.error("expected `;` or `{`"); | 19 | p.error("expected `;` or `{`"); |
@@ -23,9 +23,9 @@ pub(super) fn struct_def(p: &mut Parser, m: Marker, kind: SyntaxKind) { | |||
23 | T![;] if kind == T![struct] => { | 23 | T![;] if kind == T![struct] => { |
24 | p.bump(); | 24 | p.bump(); |
25 | } | 25 | } |
26 | T!['{'] => named_field_def_list(p), | 26 | T!['{'] => record_field_def_list(p), |
27 | T!['('] if kind == T![struct] => { | 27 | T!['('] if kind == T![struct] => { |
28 | pos_field_def_list(p); | 28 | tuple_field_def_list(p); |
29 | // test tuple_struct_where | 29 | // test tuple_struct_where |
30 | // struct Test<T>(T) where T: Clone; | 30 | // struct Test<T>(T) where T: Clone; |
31 | // struct Test<T>(T); | 31 | // struct Test<T>(T); |
@@ -70,8 +70,8 @@ pub(crate) fn enum_variant_list(p: &mut Parser) { | |||
70 | if p.at(IDENT) { | 70 | if p.at(IDENT) { |
71 | name(p); | 71 | name(p); |
72 | match p.current() { | 72 | match p.current() { |
73 | T!['{'] => named_field_def_list(p), | 73 | T!['{'] => record_field_def_list(p), |
74 | T!['('] => pos_field_def_list(p), | 74 | T!['('] => tuple_field_def_list(p), |
75 | T![=] => { | 75 | T![=] => { |
76 | p.bump(); | 76 | p.bump(); |
77 | expressions::expr(p); | 77 | expressions::expr(p); |
@@ -91,7 +91,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) { | |||
91 | m.complete(p, ENUM_VARIANT_LIST); | 91 | m.complete(p, ENUM_VARIANT_LIST); |
92 | } | 92 | } |
93 | 93 | ||
94 | pub(crate) fn named_field_def_list(p: &mut Parser) { | 94 | pub(crate) fn record_field_def_list(p: &mut Parser) { |
95 | assert!(p.at(T!['{'])); | 95 | assert!(p.at(T!['{'])); |
96 | let m = p.start(); | 96 | let m = p.start(); |
97 | p.bump(); | 97 | p.bump(); |
@@ -100,17 +100,17 @@ pub(crate) fn named_field_def_list(p: &mut Parser) { | |||
100 | error_block(p, "expected field"); | 100 | error_block(p, "expected field"); |
101 | continue; | 101 | continue; |
102 | } | 102 | } |
103 | named_field_def(p); | 103 | record_field_def(p); |
104 | if !p.at(T!['}']) { | 104 | if !p.at(T!['}']) { |
105 | p.expect(T![,]); | 105 | p.expect(T![,]); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | p.expect(T!['}']); | 108 | p.expect(T!['}']); |
109 | m.complete(p, NAMED_FIELD_DEF_LIST); | 109 | m.complete(p, RECORD_FIELD_DEF_LIST); |
110 | 110 | ||
111 | fn named_field_def(p: &mut Parser) { | 111 | fn record_field_def(p: &mut Parser) { |
112 | let m = p.start(); | 112 | let m = p.start(); |
113 | // test field_attrs | 113 | // test record_field_attrs |
114 | // struct S { | 114 | // struct S { |
115 | // #[serde(with = "url_serde")] | 115 | // #[serde(with = "url_serde")] |
116 | // pub uri: Uri, | 116 | // pub uri: Uri, |
@@ -121,7 +121,7 @@ pub(crate) fn named_field_def_list(p: &mut Parser) { | |||
121 | name(p); | 121 | name(p); |
122 | p.expect(T![:]); | 122 | p.expect(T![:]); |
123 | types::type_(p); | 123 | types::type_(p); |
124 | m.complete(p, NAMED_FIELD_DEF); | 124 | m.complete(p, RECORD_FIELD_DEF); |
125 | } else { | 125 | } else { |
126 | m.abandon(p); | 126 | m.abandon(p); |
127 | p.err_and_bump("expected field declaration"); | 127 | p.err_and_bump("expected field declaration"); |
@@ -129,7 +129,7 @@ pub(crate) fn named_field_def_list(p: &mut Parser) { | |||
129 | } | 129 | } |
130 | } | 130 | } |
131 | 131 | ||
132 | fn pos_field_def_list(p: &mut Parser) { | 132 | fn tuple_field_def_list(p: &mut Parser) { |
133 | assert!(p.at(T!['('])); | 133 | assert!(p.at(T!['('])); |
134 | let m = p.start(); | 134 | let m = p.start(); |
135 | if !p.expect(T!['(']) { | 135 | if !p.expect(T!['(']) { |
@@ -137,7 +137,7 @@ fn pos_field_def_list(p: &mut Parser) { | |||
137 | } | 137 | } |
138 | while !p.at(T![')']) && !p.at(EOF) { | 138 | while !p.at(T![')']) && !p.at(EOF) { |
139 | let m = p.start(); | 139 | let m = p.start(); |
140 | // test pos_field_attrs | 140 | // test tuple_field_attrs |
141 | // struct S ( | 141 | // struct S ( |
142 | // #[serde(with = "url_serde")] | 142 | // #[serde(with = "url_serde")] |
143 | // pub Uri, | 143 | // pub Uri, |
@@ -154,12 +154,12 @@ fn pos_field_def_list(p: &mut Parser) { | |||
154 | break; | 154 | break; |
155 | } | 155 | } |
156 | types::type_(p); | 156 | types::type_(p); |
157 | m.complete(p, POS_FIELD_DEF); | 157 | m.complete(p, TUPLE_FIELD_DEF); |
158 | 158 | ||
159 | if !p.at(T![')']) { | 159 | if !p.at(T![')']) { |
160 | p.expect(T![,]); | 160 | p.expect(T![,]); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | p.expect(T![')']); | 163 | p.expect(T![')']); |
164 | m.complete(p, POS_FIELD_DEF_LIST); | 164 | m.complete(p, TUPLE_FIELD_DEF_LIST); |
165 | } | 165 | } |
diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs index 1f6a6fd48..eae70ab85 100644 --- a/crates/ra_parser/src/grammar/patterns.rs +++ b/crates/ra_parser/src/grammar/patterns.rs | |||
@@ -56,37 +56,33 @@ const PAT_RECOVERY_SET: TokenSet = | |||
56 | token_set![LET_KW, IF_KW, WHILE_KW, LOOP_KW, MATCH_KW, R_PAREN, COMMA]; | 56 | token_set![LET_KW, IF_KW, WHILE_KW, LOOP_KW, MATCH_KW, R_PAREN, COMMA]; |
57 | 57 | ||
58 | fn atom_pat(p: &mut Parser, recovery_set: TokenSet) -> Option<CompletedMarker> { | 58 | fn atom_pat(p: &mut Parser, recovery_set: TokenSet) -> Option<CompletedMarker> { |
59 | let la0 = p.nth(0); | 59 | // Checks the token after an IDENT to see if a pattern is a path (Struct { .. }) or macro |
60 | let la1 = p.nth(1); | 60 | // (T![x]). |
61 | if la0 == T![ref] | 61 | let is_path_or_macro_pat = |
62 | || la0 == T![mut] | 62 | |la1| la1 == T![::] || la1 == T!['('] || la1 == T!['{'] || la1 == T![!]; |
63 | || la0 == T![box] | ||
64 | || (la0 == IDENT && !(la1 == T![::] || la1 == T!['('] || la1 == T!['{'] || la1 == T![!])) | ||
65 | { | ||
66 | return Some(bind_pat(p, true)); | ||
67 | } | ||
68 | if paths::is_use_path_start(p) { | ||
69 | return Some(path_pat(p)); | ||
70 | } | ||
71 | 63 | ||
72 | if is_literal_pat_start(p) { | 64 | let m = match p.nth(0) { |
73 | return Some(literal_pat(p)); | 65 | T![box] => box_pat(p), |
74 | } | 66 | T![ref] | T![mut] | IDENT if !is_path_or_macro_pat(p.nth(1)) => bind_pat(p, true), |
67 | |||
68 | _ if paths::is_use_path_start(p) => path_pat(p), | ||
69 | _ if is_literal_pat_start(p) => literal_pat(p), | ||
75 | 70 | ||
76 | let m = match la0 { | ||
77 | T![_] => placeholder_pat(p), | 71 | T![_] => placeholder_pat(p), |
78 | T![&] => ref_pat(p), | 72 | T![&] => ref_pat(p), |
79 | T!['('] => tuple_pat(p), | 73 | T!['('] => tuple_pat(p), |
80 | T!['['] => slice_pat(p), | 74 | T!['['] => slice_pat(p), |
75 | |||
81 | _ => { | 76 | _ => { |
82 | p.err_recover("expected pattern", recovery_set); | 77 | p.err_recover("expected pattern", recovery_set); |
83 | return None; | 78 | return None; |
84 | } | 79 | } |
85 | }; | 80 | }; |
81 | |||
86 | Some(m) | 82 | Some(m) |
87 | } | 83 | } |
88 | 84 | ||
89 | fn is_literal_pat_start(p: &mut Parser) -> bool { | 85 | fn is_literal_pat_start(p: &Parser) -> bool { |
90 | p.at(T![-]) && (p.nth(1) == INT_NUMBER || p.nth(1) == FLOAT_NUMBER) | 86 | p.at(T![-]) && (p.nth(1) == INT_NUMBER || p.nth(1) == FLOAT_NUMBER) |
91 | || p.at_ts(expressions::LITERAL_FIRST) | 87 | || p.at_ts(expressions::LITERAL_FIRST) |
92 | } | 88 | } |
@@ -127,8 +123,8 @@ fn path_pat(p: &mut Parser) -> CompletedMarker { | |||
127 | TUPLE_STRUCT_PAT | 123 | TUPLE_STRUCT_PAT |
128 | } | 124 | } |
129 | T!['{'] => { | 125 | T!['{'] => { |
130 | field_pat_list(p); | 126 | record_field_pat_list(p); |
131 | STRUCT_PAT | 127 | RECORD_PAT |
132 | } | 128 | } |
133 | _ => PATH_PAT, | 129 | _ => PATH_PAT, |
134 | }; | 130 | }; |
@@ -149,22 +145,25 @@ fn tuple_pat_fields(p: &mut Parser) { | |||
149 | p.expect(T![')']); | 145 | p.expect(T![')']); |
150 | } | 146 | } |
151 | 147 | ||
152 | // test field_pat_list | 148 | // test record_field_pat_list |
153 | // fn foo() { | 149 | // fn foo() { |
154 | // let S {} = (); | 150 | // let S {} = (); |
155 | // let S { f, ref mut g } = (); | 151 | // let S { f, ref mut g } = (); |
156 | // let S { h: _, ..} = (); | 152 | // let S { h: _, ..} = (); |
157 | // let S { h: _, } = (); | 153 | // let S { h: _, } = (); |
158 | // } | 154 | // } |
159 | fn field_pat_list(p: &mut Parser) { | 155 | fn record_field_pat_list(p: &mut Parser) { |
160 | assert!(p.at(T!['{'])); | 156 | assert!(p.at(T!['{'])); |
161 | let m = p.start(); | 157 | let m = p.start(); |
162 | p.bump(); | 158 | p.bump(); |
163 | while !p.at(EOF) && !p.at(T!['}']) { | 159 | while !p.at(EOF) && !p.at(T!['}']) { |
164 | match p.current() { | 160 | match p.current() { |
165 | T![..] => p.bump(), | 161 | T![..] => p.bump(), |
166 | IDENT if p.nth(1) == T![:] => field_pat(p), | 162 | IDENT if p.nth(1) == T![:] => record_field_pat(p), |
167 | T!['{'] => error_block(p, "expected ident"), | 163 | T!['{'] => error_block(p, "expected ident"), |
164 | T![box] => { | ||
165 | box_pat(p); | ||
166 | } | ||
168 | _ => { | 167 | _ => { |
169 | bind_pat(p, false); | 168 | bind_pat(p, false); |
170 | } | 169 | } |
@@ -174,10 +173,10 @@ fn field_pat_list(p: &mut Parser) { | |||
174 | } | 173 | } |
175 | } | 174 | } |
176 | p.expect(T!['}']); | 175 | p.expect(T!['}']); |
177 | m.complete(p, FIELD_PAT_LIST); | 176 | m.complete(p, RECORD_FIELD_PAT_LIST); |
178 | } | 177 | } |
179 | 178 | ||
180 | fn field_pat(p: &mut Parser) { | 179 | fn record_field_pat(p: &mut Parser) { |
181 | assert!(p.at(IDENT)); | 180 | assert!(p.at(IDENT)); |
182 | assert!(p.nth(1) == T![:]); | 181 | assert!(p.nth(1) == T![:]); |
183 | 182 | ||
@@ -185,7 +184,7 @@ fn field_pat(p: &mut Parser) { | |||
185 | name(p); | 184 | name(p); |
186 | p.bump(); | 185 | p.bump(); |
187 | pattern(p); | 186 | pattern(p); |
188 | m.complete(p, FIELD_PAT); | 187 | m.complete(p, RECORD_FIELD_PAT); |
189 | } | 188 | } |
190 | 189 | ||
191 | // test placeholder_pat | 190 | // test placeholder_pat |
@@ -261,11 +260,9 @@ fn pat_list(p: &mut Parser, ket: SyntaxKind) { | |||
261 | // let ref mut d = (); | 260 | // let ref mut d = (); |
262 | // let e @ _ = (); | 261 | // let e @ _ = (); |
263 | // let ref mut f @ g @ _ = (); | 262 | // let ref mut f @ g @ _ = (); |
264 | // let box i = Box::new(1i32); | ||
265 | // } | 263 | // } |
266 | fn bind_pat(p: &mut Parser, with_at: bool) -> CompletedMarker { | 264 | fn bind_pat(p: &mut Parser, with_at: bool) -> CompletedMarker { |
267 | let m = p.start(); | 265 | let m = p.start(); |
268 | p.eat(T![box]); | ||
269 | p.eat(T![ref]); | 266 | p.eat(T![ref]); |
270 | p.eat(T![mut]); | 267 | p.eat(T![mut]); |
271 | name(p); | 268 | name(p); |
@@ -274,3 +271,17 @@ fn bind_pat(p: &mut Parser, with_at: bool) -> CompletedMarker { | |||
274 | } | 271 | } |
275 | m.complete(p, BIND_PAT) | 272 | m.complete(p, BIND_PAT) |
276 | } | 273 | } |
274 | |||
275 | // test box_pat | ||
276 | // fn main() { | ||
277 | // let box i = (); | ||
278 | // let box Outer { box i, j: box Inner(box &x) } = (); | ||
279 | // let box ref mut i = (); | ||
280 | // } | ||
281 | fn box_pat(p: &mut Parser) -> CompletedMarker { | ||
282 | assert!(p.at(T![box])); | ||
283 | let m = p.start(); | ||
284 | p.bump(); | ||
285 | pattern(p); | ||
286 | m.complete(p, BOX_PAT) | ||
287 | } | ||
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 3a67d7ddd..8ba29ebf8 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs | |||
@@ -149,12 +149,13 @@ pub enum SyntaxKind { | |||
149 | IMPL_TRAIT_TYPE, | 149 | IMPL_TRAIT_TYPE, |
150 | DYN_TRAIT_TYPE, | 150 | DYN_TRAIT_TYPE, |
151 | REF_PAT, | 151 | REF_PAT, |
152 | BOX_PAT, | ||
152 | BIND_PAT, | 153 | BIND_PAT, |
153 | PLACEHOLDER_PAT, | 154 | PLACEHOLDER_PAT, |
154 | PATH_PAT, | 155 | PATH_PAT, |
155 | STRUCT_PAT, | 156 | RECORD_PAT, |
156 | FIELD_PAT_LIST, | 157 | RECORD_FIELD_PAT_LIST, |
157 | FIELD_PAT, | 158 | RECORD_FIELD_PAT, |
158 | TUPLE_STRUCT_PAT, | 159 | TUPLE_STRUCT_PAT, |
159 | TUPLE_PAT, | 160 | TUPLE_PAT, |
160 | SLICE_PAT, | 161 | SLICE_PAT, |
@@ -179,9 +180,9 @@ pub enum SyntaxKind { | |||
179 | MATCH_ARM_LIST, | 180 | MATCH_ARM_LIST, |
180 | MATCH_ARM, | 181 | MATCH_ARM, |
181 | MATCH_GUARD, | 182 | MATCH_GUARD, |
182 | STRUCT_LIT, | 183 | RECORD_LIT, |
183 | NAMED_FIELD_LIST, | 184 | RECORD_FIELD_LIST, |
184 | NAMED_FIELD, | 185 | RECORD_FIELD, |
185 | TRY_BLOCK_EXPR, | 186 | TRY_BLOCK_EXPR, |
186 | BOX_EXPR, | 187 | BOX_EXPR, |
187 | CALL_EXPR, | 188 | CALL_EXPR, |
@@ -199,10 +200,10 @@ pub enum SyntaxKind { | |||
199 | EXTERN_BLOCK, | 200 | EXTERN_BLOCK, |
200 | EXTERN_ITEM_LIST, | 201 | EXTERN_ITEM_LIST, |
201 | ENUM_VARIANT, | 202 | ENUM_VARIANT, |
202 | NAMED_FIELD_DEF_LIST, | 203 | RECORD_FIELD_DEF_LIST, |
203 | NAMED_FIELD_DEF, | 204 | RECORD_FIELD_DEF, |
204 | POS_FIELD_DEF_LIST, | 205 | TUPLE_FIELD_DEF_LIST, |
205 | POS_FIELD_DEF, | 206 | TUPLE_FIELD_DEF, |
206 | ENUM_VARIANT_LIST, | 207 | ENUM_VARIANT_LIST, |
207 | ITEM_LIST, | 208 | ITEM_LIST, |
208 | ATTR, | 209 | ATTR, |