diff options
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar.rs | 20 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions.rs | 6 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/expressions/atom.rs | 2 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items.rs | 18 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/adt.rs | 18 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/consts.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/traits.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/use_item.rs | 2 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/patterns.rs | 12 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/type_args.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/type_params.rs | 2 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/types.rs | 8 | ||||
-rw-r--r-- | crates/ra_parser/src/syntax_kind/generated.rs | 72 |
13 files changed, 88 insertions, 84 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index caedeead0..c2e1d701e 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs | |||
@@ -142,19 +142,19 @@ pub(crate) fn reparser( | |||
142 | ) -> Option<fn(&mut Parser)> { | 142 | ) -> Option<fn(&mut Parser)> { |
143 | let res = match node { | 143 | let res = match node { |
144 | BLOCK_EXPR => expressions::block_expr, | 144 | BLOCK_EXPR => expressions::block_expr, |
145 | RECORD_FIELD_DEF_LIST => items::record_field_def_list, | 145 | RECORD_FIELD_LIST => items::record_field_def_list, |
146 | RECORD_FIELD_LIST => items::record_field_list, | 146 | RECORD_EXPR_FIELD_LIST => items::record_field_list, |
147 | ENUM_VARIANT_LIST => items::enum_variant_list, | 147 | VARIANT_LIST => items::enum_variant_list, |
148 | MATCH_ARM_LIST => items::match_arm_list, | 148 | MATCH_ARM_LIST => items::match_arm_list, |
149 | USE_TREE_LIST => items::use_tree_list, | 149 | USE_TREE_LIST => items::use_tree_list, |
150 | EXTERN_ITEM_LIST => items::extern_item_list, | 150 | EXTERN_ITEM_LIST => items::extern_item_list, |
151 | TOKEN_TREE if first_child? == T!['{'] => items::token_tree, | 151 | TOKEN_TREE if first_child? == T!['{'] => items::token_tree, |
152 | ITEM_LIST => match parent? { | 152 | ASSOC_ITEM_LIST => match parent? { |
153 | IMPL_DEF => items::impl_item_list, | 153 | IMPL => items::impl_item_list, |
154 | TRAIT_DEF => items::trait_item_list, | 154 | TRAIT => items::trait_item_list, |
155 | MODULE => items::mod_item_list, | ||
156 | _ => return None, | 155 | _ => return None, |
157 | }, | 156 | }, |
157 | ITEM_LIST => items::mod_item_list, | ||
158 | _ => return None, | 158 | _ => return None, |
159 | }; | 159 | }; |
160 | Some(res) | 160 | Some(res) |
@@ -224,7 +224,7 @@ fn opt_alias(p: &mut Parser) { | |||
224 | if !p.eat(T![_]) { | 224 | if !p.eat(T![_]) { |
225 | name(p); | 225 | name(p); |
226 | } | 226 | } |
227 | m.complete(p, ALIAS); | 227 | m.complete(p, RENAME); |
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
@@ -270,10 +270,6 @@ fn name_ref(p: &mut Parser) { | |||
270 | let m = p.start(); | 270 | let m = p.start(); |
271 | p.bump(IDENT); | 271 | p.bump(IDENT); |
272 | m.complete(p, NAME_REF); | 272 | m.complete(p, NAME_REF); |
273 | } else if p.at(T![self]) { | ||
274 | let m = p.start(); | ||
275 | p.bump(T![self]); | ||
276 | m.complete(p, T![self]); | ||
277 | } else { | 273 | } else { |
278 | p.err_and_bump("expected identifier"); | 274 | p.err_and_bump("expected identifier"); |
279 | } | 275 | } |
diff --git a/crates/ra_parser/src/grammar/expressions.rs b/crates/ra_parser/src/grammar/expressions.rs index 6e72eea66..e1c25a838 100644 --- a/crates/ra_parser/src/grammar/expressions.rs +++ b/crates/ra_parser/src/grammar/expressions.rs | |||
@@ -587,7 +587,7 @@ fn path_expr(p: &mut Parser, r: Restrictions) -> (CompletedMarker, BlockLike) { | |||
587 | match p.current() { | 587 | match p.current() { |
588 | T!['{'] if !r.forbid_structs => { | 588 | T!['{'] if !r.forbid_structs => { |
589 | record_field_list(p); | 589 | record_field_list(p); |
590 | (m.complete(p, RECORD_LIT), BlockLike::NotBlock) | 590 | (m.complete(p, RECORD_EXPR), BlockLike::NotBlock) |
591 | } | 591 | } |
592 | T![!] if !p.at(T![!=]) => { | 592 | T![!] if !p.at(T![!=]) => { |
593 | let block_like = items::macro_call_after_excl(p); | 593 | let block_like = items::macro_call_after_excl(p); |
@@ -627,7 +627,7 @@ pub(crate) fn record_field_list(p: &mut Parser) { | |||
627 | p.expect(T![:]); | 627 | p.expect(T![:]); |
628 | } | 628 | } |
629 | expr(p); | 629 | expr(p); |
630 | m.complete(p, RECORD_FIELD); | 630 | m.complete(p, RECORD_EXPR_FIELD); |
631 | } | 631 | } |
632 | T![.] if p.at(T![..]) => { | 632 | T![.] if p.at(T![..]) => { |
633 | m.abandon(p); | 633 | m.abandon(p); |
@@ -648,5 +648,5 @@ pub(crate) fn record_field_list(p: &mut Parser) { | |||
648 | } | 648 | } |
649 | } | 649 | } |
650 | p.expect(T!['}']); | 650 | p.expect(T!['}']); |
651 | m.complete(p, RECORD_FIELD_LIST); | 651 | m.complete(p, RECORD_EXPR_FIELD_LIST); |
652 | } | 652 | } |
diff --git a/crates/ra_parser/src/grammar/expressions/atom.rs b/crates/ra_parser/src/grammar/expressions/atom.rs index 706a2f796..0b01d3bc6 100644 --- a/crates/ra_parser/src/grammar/expressions/atom.rs +++ b/crates/ra_parser/src/grammar/expressions/atom.rs | |||
@@ -250,7 +250,7 @@ fn lambda_expr(p: &mut Parser) -> CompletedMarker { | |||
250 | p.error("expected expression"); | 250 | p.error("expected expression"); |
251 | } | 251 | } |
252 | } | 252 | } |
253 | m.complete(p, LAMBDA_EXPR) | 253 | m.complete(p, CLOSURE_EXPR) |
254 | } | 254 | } |
255 | 255 | ||
256 | // test if_expr | 256 | // test if_expr |
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 97642bc24..cca524cea 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs | |||
@@ -180,7 +180,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
180 | // unsafe const fn bar() {} | 180 | // unsafe const fn bar() {} |
181 | T![fn] => { | 181 | T![fn] => { |
182 | fn_def(p); | 182 | fn_def(p); |
183 | m.complete(p, FN_DEF); | 183 | m.complete(p, FN); |
184 | } | 184 | } |
185 | 185 | ||
186 | // test unsafe_trait | 186 | // test unsafe_trait |
@@ -193,7 +193,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
193 | // unsafe auto trait T {} | 193 | // unsafe auto trait T {} |
194 | T![trait] => { | 194 | T![trait] => { |
195 | traits::trait_def(p); | 195 | traits::trait_def(p); |
196 | m.complete(p, TRAIT_DEF); | 196 | m.complete(p, TRAIT); |
197 | } | 197 | } |
198 | 198 | ||
199 | // test unsafe_impl | 199 | // test unsafe_impl |
@@ -221,7 +221,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul | |||
221 | // unsafe default impl Foo {} | 221 | // unsafe default impl Foo {} |
222 | T![impl] => { | 222 | T![impl] => { |
223 | traits::impl_def(p); | 223 | traits::impl_def(p); |
224 | m.complete(p, IMPL_DEF); | 224 | m.complete(p, IMPL); |
225 | } | 225 | } |
226 | 226 | ||
227 | // test existential_type | 227 | // test existential_type |
@@ -304,10 +304,16 @@ fn extern_crate_item(p: &mut Parser, m: Marker) { | |||
304 | p.bump(T![extern]); | 304 | p.bump(T![extern]); |
305 | assert!(p.at(T![crate])); | 305 | assert!(p.at(T![crate])); |
306 | p.bump(T![crate]); | 306 | p.bump(T![crate]); |
307 | name_ref(p); | 307 | |
308 | if p.at(T![self]) { | ||
309 | p.bump(T![self]); | ||
310 | } else { | ||
311 | name_ref(p); | ||
312 | } | ||
313 | |||
308 | opt_alias(p); | 314 | opt_alias(p); |
309 | p.expect(T![;]); | 315 | p.expect(T![;]); |
310 | m.complete(p, EXTERN_CRATE_ITEM); | 316 | m.complete(p, EXTERN_CRATE); |
311 | } | 317 | } |
312 | 318 | ||
313 | pub(crate) fn extern_item_list(p: &mut Parser) { | 319 | pub(crate) fn extern_item_list(p: &mut Parser) { |
@@ -374,7 +380,7 @@ fn type_def(p: &mut Parser, m: Marker) { | |||
374 | types::type_(p); | 380 | types::type_(p); |
375 | } | 381 | } |
376 | p.expect(T![;]); | 382 | p.expect(T![;]); |
377 | m.complete(p, TYPE_ALIAS_DEF); | 383 | m.complete(p, TYPE_ALIAS); |
378 | } | 384 | } |
379 | 385 | ||
380 | pub(crate) fn mod_item(p: &mut Parser, m: Marker) { | 386 | pub(crate) fn mod_item(p: &mut Parser, m: Marker) { |
diff --git a/crates/ra_parser/src/grammar/items/adt.rs b/crates/ra_parser/src/grammar/items/adt.rs index 74b9f514b..addfb59d4 100644 --- a/crates/ra_parser/src/grammar/items/adt.rs +++ b/crates/ra_parser/src/grammar/items/adt.rs | |||
@@ -5,13 +5,13 @@ use super::*; | |||
5 | pub(super) fn struct_def(p: &mut Parser, m: Marker) { | 5 | pub(super) fn struct_def(p: &mut Parser, m: Marker) { |
6 | assert!(p.at(T![struct])); | 6 | assert!(p.at(T![struct])); |
7 | p.bump(T![struct]); | 7 | p.bump(T![struct]); |
8 | struct_or_union(p, m, T![struct], STRUCT_DEF); | 8 | struct_or_union(p, m, T![struct], STRUCT); |
9 | } | 9 | } |
10 | 10 | ||
11 | pub(super) fn union_def(p: &mut Parser, m: Marker) { | 11 | pub(super) fn union_def(p: &mut Parser, m: Marker) { |
12 | assert!(p.at_contextual_kw("union")); | 12 | assert!(p.at_contextual_kw("union")); |
13 | p.bump_remap(T![union]); | 13 | p.bump_remap(T![union]); |
14 | struct_or_union(p, m, T![union], UNION_DEF); | 14 | struct_or_union(p, m, T![union], UNION); |
15 | } | 15 | } |
16 | 16 | ||
17 | fn struct_or_union(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { | 17 | fn struct_or_union(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { |
@@ -64,7 +64,7 @@ pub(super) fn enum_def(p: &mut Parser, m: Marker) { | |||
64 | } else { | 64 | } else { |
65 | p.error("expected `{`") | 65 | p.error("expected `{`") |
66 | } | 66 | } |
67 | m.complete(p, ENUM_DEF); | 67 | m.complete(p, ENUM); |
68 | } | 68 | } |
69 | 69 | ||
70 | pub(crate) fn enum_variant_list(p: &mut Parser) { | 70 | pub(crate) fn enum_variant_list(p: &mut Parser) { |
@@ -91,7 +91,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) { | |||
91 | if p.eat(T![=]) { | 91 | if p.eat(T![=]) { |
92 | expressions::expr(p); | 92 | expressions::expr(p); |
93 | } | 93 | } |
94 | var.complete(p, ENUM_VARIANT); | 94 | var.complete(p, VARIANT); |
95 | } else { | 95 | } else { |
96 | var.abandon(p); | 96 | var.abandon(p); |
97 | p.err_and_bump("expected enum variant"); | 97 | p.err_and_bump("expected enum variant"); |
@@ -101,7 +101,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) { | |||
101 | } | 101 | } |
102 | } | 102 | } |
103 | p.expect(T!['}']); | 103 | p.expect(T!['}']); |
104 | m.complete(p, ENUM_VARIANT_LIST); | 104 | m.complete(p, VARIANT_LIST); |
105 | } | 105 | } |
106 | 106 | ||
107 | pub(crate) fn record_field_def_list(p: &mut Parser) { | 107 | pub(crate) fn record_field_def_list(p: &mut Parser) { |
@@ -119,7 +119,7 @@ pub(crate) fn record_field_def_list(p: &mut Parser) { | |||
119 | } | 119 | } |
120 | } | 120 | } |
121 | p.expect(T!['}']); | 121 | p.expect(T!['}']); |
122 | m.complete(p, RECORD_FIELD_DEF_LIST); | 122 | m.complete(p, RECORD_FIELD_LIST); |
123 | 123 | ||
124 | fn record_field_def(p: &mut Parser) { | 124 | fn record_field_def(p: &mut Parser) { |
125 | let m = p.start(); | 125 | let m = p.start(); |
@@ -134,7 +134,7 @@ pub(crate) fn record_field_def_list(p: &mut Parser) { | |||
134 | name(p); | 134 | name(p); |
135 | p.expect(T![:]); | 135 | p.expect(T![:]); |
136 | types::type_(p); | 136 | types::type_(p); |
137 | m.complete(p, RECORD_FIELD_DEF); | 137 | m.complete(p, RECORD_FIELD); |
138 | } else { | 138 | } else { |
139 | m.abandon(p); | 139 | m.abandon(p); |
140 | p.err_and_bump("expected field declaration"); | 140 | p.err_and_bump("expected field declaration"); |
@@ -167,12 +167,12 @@ fn tuple_field_def_list(p: &mut Parser) { | |||
167 | break; | 167 | break; |
168 | } | 168 | } |
169 | types::type_(p); | 169 | types::type_(p); |
170 | m.complete(p, TUPLE_FIELD_DEF); | 170 | m.complete(p, TUPLE_FIELD); |
171 | 171 | ||
172 | if !p.at(T![')']) { | 172 | if !p.at(T![')']) { |
173 | p.expect(T![,]); | 173 | p.expect(T![,]); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | p.expect(T![')']); | 176 | p.expect(T![')']); |
177 | m.complete(p, TUPLE_FIELD_DEF_LIST); | 177 | m.complete(p, TUPLE_FIELD_LIST); |
178 | } | 178 | } |
diff --git a/crates/ra_parser/src/grammar/items/consts.rs b/crates/ra_parser/src/grammar/items/consts.rs index 742a7e056..35ad766dc 100644 --- a/crates/ra_parser/src/grammar/items/consts.rs +++ b/crates/ra_parser/src/grammar/items/consts.rs | |||
@@ -3,11 +3,11 @@ | |||
3 | use super::*; | 3 | use super::*; |
4 | 4 | ||
5 | pub(super) fn static_def(p: &mut Parser, m: Marker) { | 5 | pub(super) fn static_def(p: &mut Parser, m: Marker) { |
6 | const_or_static(p, m, T![static], STATIC_DEF) | 6 | const_or_static(p, m, T![static], STATIC) |
7 | } | 7 | } |
8 | 8 | ||
9 | pub(super) fn const_def(p: &mut Parser, m: Marker) { | 9 | pub(super) fn const_def(p: &mut Parser, m: Marker) { |
10 | const_or_static(p, m, T![const], CONST_DEF) | 10 | const_or_static(p, m, T![const], CONST) |
11 | } | 11 | } |
12 | 12 | ||
13 | fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { | 13 | fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { |
diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs index c819e33be..ef9c8ff5b 100644 --- a/crates/ra_parser/src/grammar/items/traits.rs +++ b/crates/ra_parser/src/grammar/items/traits.rs | |||
@@ -50,7 +50,7 @@ pub(crate) fn trait_item_list(p: &mut Parser) { | |||
50 | item_or_macro(p, true, ItemFlavor::Trait); | 50 | item_or_macro(p, true, ItemFlavor::Trait); |
51 | } | 51 | } |
52 | p.expect(T!['}']); | 52 | p.expect(T!['}']); |
53 | m.complete(p, ITEM_LIST); | 53 | m.complete(p, ASSOC_ITEM_LIST); |
54 | } | 54 | } |
55 | 55 | ||
56 | // test impl_def | 56 | // test impl_def |
@@ -107,7 +107,7 @@ pub(crate) fn impl_item_list(p: &mut Parser) { | |||
107 | item_or_macro(p, true, ItemFlavor::Mod); | 107 | item_or_macro(p, true, ItemFlavor::Mod); |
108 | } | 108 | } |
109 | p.expect(T!['}']); | 109 | p.expect(T!['}']); |
110 | m.complete(p, ITEM_LIST); | 110 | m.complete(p, ASSOC_ITEM_LIST); |
111 | } | 111 | } |
112 | 112 | ||
113 | // test impl_type_params | 113 | // test impl_type_params |
diff --git a/crates/ra_parser/src/grammar/items/use_item.rs b/crates/ra_parser/src/grammar/items/use_item.rs index 3a0c7a31a..8e836a77e 100644 --- a/crates/ra_parser/src/grammar/items/use_item.rs +++ b/crates/ra_parser/src/grammar/items/use_item.rs | |||
@@ -7,7 +7,7 @@ pub(super) fn use_item(p: &mut Parser, m: Marker) { | |||
7 | p.bump(T![use]); | 7 | p.bump(T![use]); |
8 | use_tree(p, true); | 8 | use_tree(p, true); |
9 | p.expect(T![;]); | 9 | p.expect(T![;]); |
10 | m.complete(p, USE_ITEM); | 10 | m.complete(p, USE); |
11 | } | 11 | } |
12 | 12 | ||
13 | /// Parse a use 'tree', such as `some::path` in `use some::path;` | 13 | /// Parse a use 'tree', such as `some::path` in `use some::path;` |
diff --git a/crates/ra_parser/src/grammar/patterns.rs b/crates/ra_parser/src/grammar/patterns.rs index 427c0eb49..716bdc978 100644 --- a/crates/ra_parser/src/grammar/patterns.rs +++ b/crates/ra_parser/src/grammar/patterns.rs | |||
@@ -192,7 +192,7 @@ fn record_field_pat_list(p: &mut Parser) { | |||
192 | p.bump(T!['{']); | 192 | p.bump(T!['{']); |
193 | while !p.at(EOF) && !p.at(T!['}']) { | 193 | while !p.at(EOF) && !p.at(T!['}']) { |
194 | match p.current() { | 194 | match p.current() { |
195 | // A trailing `..` is *not* treated as a DOT_DOT_PAT. | 195 | // A trailing `..` is *not* treated as a REST_PAT. |
196 | T![.] if p.at(T![..]) => p.bump(T![..]), | 196 | T![.] if p.at(T![..]) => p.bump(T![..]), |
197 | T!['{'] => error_block(p, "expected ident"), | 197 | T!['{'] => error_block(p, "expected ident"), |
198 | 198 | ||
@@ -217,7 +217,7 @@ fn record_field_pat_list(p: &mut Parser) { | |||
217 | bind_pat(p, false); | 217 | bind_pat(p, false); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | m.complete(p, RECORD_FIELD_PAT); | 220 | m.complete(p, RECORD_PAT_FIELD); |
221 | } | 221 | } |
222 | } | 222 | } |
223 | if !p.at(T!['}']) { | 223 | if !p.at(T!['}']) { |
@@ -225,7 +225,7 @@ fn record_field_pat_list(p: &mut Parser) { | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | p.expect(T!['}']); | 227 | p.expect(T!['}']); |
228 | m.complete(p, RECORD_FIELD_PAT_LIST); | 228 | m.complete(p, RECORD_PAT_FIELD_LIST); |
229 | } | 229 | } |
230 | 230 | ||
231 | // test placeholder_pat | 231 | // test placeholder_pat |
@@ -234,7 +234,7 @@ fn placeholder_pat(p: &mut Parser) -> CompletedMarker { | |||
234 | assert!(p.at(T![_])); | 234 | assert!(p.at(T![_])); |
235 | let m = p.start(); | 235 | let m = p.start(); |
236 | p.bump(T![_]); | 236 | p.bump(T![_]); |
237 | m.complete(p, PLACEHOLDER_PAT) | 237 | m.complete(p, WILDCARD_PAT) |
238 | } | 238 | } |
239 | 239 | ||
240 | // test dot_dot_pat | 240 | // test dot_dot_pat |
@@ -267,7 +267,7 @@ fn dot_dot_pat(p: &mut Parser) -> CompletedMarker { | |||
267 | assert!(p.at(T![..])); | 267 | assert!(p.at(T![..])); |
268 | let m = p.start(); | 268 | let m = p.start(); |
269 | p.bump(T![..]); | 269 | p.bump(T![..]); |
270 | m.complete(p, DOT_DOT_PAT) | 270 | m.complete(p, REST_PAT) |
271 | } | 271 | } |
272 | 272 | ||
273 | // test ref_pat | 273 | // test ref_pat |
@@ -361,7 +361,7 @@ fn bind_pat(p: &mut Parser, with_at: bool) -> CompletedMarker { | |||
361 | if with_at && p.eat(T![@]) { | 361 | if with_at && p.eat(T![@]) { |
362 | pattern_single(p); | 362 | pattern_single(p); |
363 | } | 363 | } |
364 | m.complete(p, BIND_PAT) | 364 | m.complete(p, IDENT_PAT) |
365 | } | 365 | } |
366 | 366 | ||
367 | // test box_pat | 367 | // test box_pat |
diff --git a/crates/ra_parser/src/grammar/type_args.rs b/crates/ra_parser/src/grammar/type_args.rs index 2d61f9d80..aef7cd6fb 100644 --- a/crates/ra_parser/src/grammar/type_args.rs +++ b/crates/ra_parser/src/grammar/type_args.rs | |||
@@ -22,7 +22,7 @@ pub(super) fn opt_type_arg_list(p: &mut Parser, colon_colon_required: bool) { | |||
22 | } | 22 | } |
23 | } | 23 | } |
24 | p.expect(T![>]); | 24 | p.expect(T![>]); |
25 | m.complete(p, TYPE_ARG_LIST); | 25 | m.complete(p, GENERIC_ARG_LIST); |
26 | } | 26 | } |
27 | 27 | ||
28 | // test type_arg | 28 | // test type_arg |
@@ -52,7 +52,7 @@ fn type_arg(p: &mut Parser) { | |||
52 | m.complete(p, CONST_ARG); | 52 | m.complete(p, CONST_ARG); |
53 | } | 53 | } |
54 | k if k.is_literal() => { | 54 | k if k.is_literal() => { |
55 | p.bump(k); | 55 | expressions::literal(p); |
56 | m.complete(p, CONST_ARG); | 56 | m.complete(p, CONST_ARG); |
57 | } | 57 | } |
58 | _ => { | 58 | _ => { |
diff --git a/crates/ra_parser/src/grammar/type_params.rs b/crates/ra_parser/src/grammar/type_params.rs index d1330d4b9..90dabb4c0 100644 --- a/crates/ra_parser/src/grammar/type_params.rs +++ b/crates/ra_parser/src/grammar/type_params.rs | |||
@@ -36,7 +36,7 @@ fn type_param_list(p: &mut Parser) { | |||
36 | } | 36 | } |
37 | } | 37 | } |
38 | p.expect(T![>]); | 38 | p.expect(T![>]); |
39 | m.complete(p, TYPE_PARAM_LIST); | 39 | m.complete(p, GENERIC_PARAM_LIST); |
40 | } | 40 | } |
41 | 41 | ||
42 | fn lifetime_param(p: &mut Parser, m: Marker) { | 42 | fn lifetime_param(p: &mut Parser, m: Marker) { |
diff --git a/crates/ra_parser/src/grammar/types.rs b/crates/ra_parser/src/grammar/types.rs index 9e8e3bd97..0aa173a52 100644 --- a/crates/ra_parser/src/grammar/types.rs +++ b/crates/ra_parser/src/grammar/types.rs | |||
@@ -117,7 +117,7 @@ fn pointer_type(p: &mut Parser) { | |||
117 | }; | 117 | }; |
118 | 118 | ||
119 | type_no_bounds(p); | 119 | type_no_bounds(p); |
120 | m.complete(p, POINTER_TYPE); | 120 | m.complete(p, PTR_TYPE); |
121 | } | 121 | } |
122 | 122 | ||
123 | fn array_or_slice_type(p: &mut Parser) { | 123 | fn array_or_slice_type(p: &mut Parser) { |
@@ -163,7 +163,7 @@ fn reference_type(p: &mut Parser) { | |||
163 | p.eat(LIFETIME); | 163 | p.eat(LIFETIME); |
164 | p.eat(T![mut]); | 164 | p.eat(T![mut]); |
165 | type_no_bounds(p); | 165 | type_no_bounds(p); |
166 | m.complete(p, REFERENCE_TYPE); | 166 | m.complete(p, REF_TYPE); |
167 | } | 167 | } |
168 | 168 | ||
169 | // test placeholder_type | 169 | // test placeholder_type |
@@ -172,7 +172,7 @@ fn placeholder_type(p: &mut Parser) { | |||
172 | assert!(p.at(T![_])); | 172 | assert!(p.at(T![_])); |
173 | let m = p.start(); | 173 | let m = p.start(); |
174 | p.bump(T![_]); | 174 | p.bump(T![_]); |
175 | m.complete(p, PLACEHOLDER_TYPE); | 175 | m.complete(p, INFER_TYPE); |
176 | } | 176 | } |
177 | 177 | ||
178 | // test fn_pointer_type | 178 | // test fn_pointer_type |
@@ -201,7 +201,7 @@ fn fn_pointer_type(p: &mut Parser) { | |||
201 | // test fn_pointer_type_with_ret | 201 | // test fn_pointer_type_with_ret |
202 | // type F = fn() -> (); | 202 | // type F = fn() -> (); |
203 | opt_fn_ret_type(p); | 203 | opt_fn_ret_type(p); |
204 | m.complete(p, FN_POINTER_TYPE); | 204 | m.complete(p, FN_PTR_TYPE); |
205 | } | 205 | } |
206 | 206 | ||
207 | pub(super) fn for_binder(p: &mut Parser) { | 207 | pub(super) fn for_binder(p: &mut Parser) { |
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index e7404492a..192ecd864 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | //! Generated file, do not edit by hand, see `xtask/src/codegen` | 1 | //! Generated file, do not edit by hand, see `xtask/src/codegen` |
2 | 2 | ||
3 | #![allow(bad_style, missing_docs, unreachable_pub)] | 3 | #![allow(bad_style, missing_docs, unreachable_pub)] |
4 | #[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT_DEF`."] | 4 | #[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT`."] |
5 | #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] | 5 | #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] |
6 | #[repr(u16)] | 6 | #[repr(u16)] |
7 | pub enum SyntaxKind { | 7 | pub enum SyntaxKind { |
@@ -123,19 +123,19 @@ pub enum SyntaxKind { | |||
123 | L_DOLLAR, | 123 | L_DOLLAR, |
124 | R_DOLLAR, | 124 | R_DOLLAR, |
125 | SOURCE_FILE, | 125 | SOURCE_FILE, |
126 | STRUCT_DEF, | 126 | STRUCT, |
127 | UNION_DEF, | 127 | UNION, |
128 | ENUM_DEF, | 128 | ENUM, |
129 | FN_DEF, | 129 | FN, |
130 | RET_TYPE, | 130 | RET_TYPE, |
131 | EXTERN_CRATE_ITEM, | 131 | EXTERN_CRATE, |
132 | MODULE, | 132 | MODULE, |
133 | USE_ITEM, | 133 | USE, |
134 | STATIC_DEF, | 134 | STATIC, |
135 | CONST_DEF, | 135 | CONST, |
136 | TRAIT_DEF, | 136 | TRAIT, |
137 | IMPL_DEF, | 137 | IMPL, |
138 | TYPE_ALIAS_DEF, | 138 | TYPE_ALIAS, |
139 | MACRO_CALL, | 139 | MACRO_CALL, |
140 | TOKEN_TREE, | 140 | TOKEN_TREE, |
141 | MACRO_DEF, | 141 | MACRO_DEF, |
@@ -143,12 +143,12 @@ pub enum SyntaxKind { | |||
143 | TUPLE_TYPE, | 143 | TUPLE_TYPE, |
144 | NEVER_TYPE, | 144 | NEVER_TYPE, |
145 | PATH_TYPE, | 145 | PATH_TYPE, |
146 | POINTER_TYPE, | 146 | PTR_TYPE, |
147 | ARRAY_TYPE, | 147 | ARRAY_TYPE, |
148 | SLICE_TYPE, | 148 | SLICE_TYPE, |
149 | REFERENCE_TYPE, | 149 | REF_TYPE, |
150 | PLACEHOLDER_TYPE, | 150 | INFER_TYPE, |
151 | FN_POINTER_TYPE, | 151 | FN_PTR_TYPE, |
152 | FOR_TYPE, | 152 | FOR_TYPE, |
153 | IMPL_TRAIT_TYPE, | 153 | IMPL_TRAIT_TYPE, |
154 | DYN_TRAIT_TYPE, | 154 | DYN_TRAIT_TYPE, |
@@ -156,13 +156,13 @@ pub enum SyntaxKind { | |||
156 | PAREN_PAT, | 156 | PAREN_PAT, |
157 | REF_PAT, | 157 | REF_PAT, |
158 | BOX_PAT, | 158 | BOX_PAT, |
159 | BIND_PAT, | 159 | IDENT_PAT, |
160 | PLACEHOLDER_PAT, | 160 | WILDCARD_PAT, |
161 | DOT_DOT_PAT, | 161 | REST_PAT, |
162 | PATH_PAT, | 162 | PATH_PAT, |
163 | RECORD_PAT, | 163 | RECORD_PAT, |
164 | RECORD_FIELD_PAT_LIST, | 164 | RECORD_PAT_FIELD_LIST, |
165 | RECORD_FIELD_PAT, | 165 | RECORD_PAT_FIELD, |
166 | TUPLE_STRUCT_PAT, | 166 | TUPLE_STRUCT_PAT, |
167 | TUPLE_PAT, | 167 | TUPLE_PAT, |
168 | SLICE_PAT, | 168 | SLICE_PAT, |
@@ -173,7 +173,7 @@ pub enum SyntaxKind { | |||
173 | ARRAY_EXPR, | 173 | ARRAY_EXPR, |
174 | PAREN_EXPR, | 174 | PAREN_EXPR, |
175 | PATH_EXPR, | 175 | PATH_EXPR, |
176 | LAMBDA_EXPR, | 176 | CLOSURE_EXPR, |
177 | IF_EXPR, | 177 | IF_EXPR, |
178 | WHILE_EXPR, | 178 | WHILE_EXPR, |
179 | CONDITION, | 179 | CONDITION, |
@@ -188,9 +188,9 @@ pub enum SyntaxKind { | |||
188 | MATCH_ARM_LIST, | 188 | MATCH_ARM_LIST, |
189 | MATCH_ARM, | 189 | MATCH_ARM, |
190 | MATCH_GUARD, | 190 | MATCH_GUARD, |
191 | RECORD_LIT, | 191 | RECORD_EXPR, |
192 | RECORD_FIELD_LIST, | 192 | RECORD_EXPR_FIELD_LIST, |
193 | RECORD_FIELD, | 193 | RECORD_EXPR_FIELD, |
194 | EFFECT_EXPR, | 194 | EFFECT_EXPR, |
195 | BOX_EXPR, | 195 | BOX_EXPR, |
196 | CALL_EXPR, | 196 | CALL_EXPR, |
@@ -206,13 +206,14 @@ pub enum SyntaxKind { | |||
206 | BIN_EXPR, | 206 | BIN_EXPR, |
207 | EXTERN_BLOCK, | 207 | EXTERN_BLOCK, |
208 | EXTERN_ITEM_LIST, | 208 | EXTERN_ITEM_LIST, |
209 | ENUM_VARIANT, | 209 | VARIANT, |
210 | RECORD_FIELD_DEF_LIST, | 210 | RECORD_FIELD_LIST, |
211 | RECORD_FIELD_DEF, | 211 | RECORD_FIELD, |
212 | TUPLE_FIELD_DEF_LIST, | 212 | TUPLE_FIELD_LIST, |
213 | TUPLE_FIELD_DEF, | 213 | TUPLE_FIELD, |
214 | ENUM_VARIANT_LIST, | 214 | VARIANT_LIST, |
215 | ITEM_LIST, | 215 | ITEM_LIST, |
216 | ASSOC_ITEM_LIST, | ||
216 | ATTR, | 217 | ATTR, |
217 | META_ITEM, | 218 | META_ITEM, |
218 | USE_TREE, | 219 | USE_TREE, |
@@ -220,7 +221,7 @@ pub enum SyntaxKind { | |||
220 | PATH, | 221 | PATH, |
221 | PATH_SEGMENT, | 222 | PATH_SEGMENT, |
222 | LITERAL, | 223 | LITERAL, |
223 | ALIAS, | 224 | RENAME, |
224 | VISIBILITY, | 225 | VISIBILITY, |
225 | WHERE_CLAUSE, | 226 | WHERE_CLAUSE, |
226 | WHERE_PRED, | 227 | WHERE_PRED, |
@@ -229,11 +230,12 @@ pub enum SyntaxKind { | |||
229 | NAME_REF, | 230 | NAME_REF, |
230 | LET_STMT, | 231 | LET_STMT, |
231 | EXPR_STMT, | 232 | EXPR_STMT, |
232 | TYPE_PARAM_LIST, | 233 | GENERIC_PARAM_LIST, |
234 | GENERIC_PARAM, | ||
233 | LIFETIME_PARAM, | 235 | LIFETIME_PARAM, |
234 | TYPE_PARAM, | 236 | TYPE_PARAM, |
235 | CONST_PARAM, | 237 | CONST_PARAM, |
236 | TYPE_ARG_LIST, | 238 | GENERIC_ARG_LIST, |
237 | LIFETIME_ARG, | 239 | LIFETIME_ARG, |
238 | TYPE_ARG, | 240 | TYPE_ARG, |
239 | ASSOC_TYPE_ARG, | 241 | ASSOC_TYPE_ARG, |
@@ -362,4 +364,4 @@ impl SyntaxKind { | |||
362 | } | 364 | } |
363 | } | 365 | } |
364 | #[macro_export] | 366 | #[macro_export] |
365 | macro_rules ! T { [ ; ] => { $ crate :: SyntaxKind :: SEMICOLON } ; [ , ] => { $ crate :: SyntaxKind :: COMMA } ; [ '(' ] => { $ crate :: SyntaxKind :: L_PAREN } ; [ ')' ] => { $ crate :: SyntaxKind :: R_PAREN } ; [ '{' ] => { $ crate :: SyntaxKind :: L_CURLY } ; [ '}' ] => { $ crate :: SyntaxKind :: R_CURLY } ; [ '[' ] => { $ crate :: SyntaxKind :: L_BRACK } ; [ ']' ] => { $ crate :: SyntaxKind :: R_BRACK } ; [ < ] => { $ crate :: SyntaxKind :: L_ANGLE } ; [ > ] => { $ crate :: SyntaxKind :: R_ANGLE } ; [ @ ] => { $ crate :: SyntaxKind :: AT } ; [ # ] => { $ crate :: SyntaxKind :: POUND } ; [ ~ ] => { $ crate :: SyntaxKind :: TILDE } ; [ ? ] => { $ crate :: SyntaxKind :: QUESTION } ; [ $ ] => { $ crate :: SyntaxKind :: DOLLAR } ; [ & ] => { $ crate :: SyntaxKind :: AMP } ; [ | ] => { $ crate :: SyntaxKind :: PIPE } ; [ + ] => { $ crate :: SyntaxKind :: PLUS } ; [ * ] => { $ crate :: SyntaxKind :: STAR } ; [ / ] => { $ crate :: SyntaxKind :: SLASH } ; [ ^ ] => { $ crate :: SyntaxKind :: CARET } ; [ % ] => { $ crate :: SyntaxKind :: PERCENT } ; [ _ ] => { $ crate :: SyntaxKind :: UNDERSCORE } ; [ . ] => { $ crate :: SyntaxKind :: DOT } ; [ .. ] => { $ crate :: SyntaxKind :: DOT2 } ; [ ... ] => { $ crate :: SyntaxKind :: DOT3 } ; [ ..= ] => { $ crate :: SyntaxKind :: DOT2EQ } ; [ : ] => { $ crate :: SyntaxKind :: COLON } ; [ :: ] => { $ crate :: SyntaxKind :: COLON2 } ; [ = ] => { $ crate :: SyntaxKind :: EQ } ; [ == ] => { $ crate :: SyntaxKind :: EQ2 } ; [ => ] => { $ crate :: SyntaxKind :: FAT_ARROW } ; [ ! ] => { $ crate :: SyntaxKind :: BANG } ; [ != ] => { $ crate :: SyntaxKind :: NEQ } ; [ - ] => { $ crate :: SyntaxKind :: MINUS } ; [ -> ] => { $ crate :: SyntaxKind :: THIN_ARROW } ; [ <= ] => { $ crate :: SyntaxKind :: LTEQ } ; [ >= ] => { $ crate :: SyntaxKind :: GTEQ } ; [ += ] => { $ crate :: SyntaxKind :: PLUSEQ } ; [ -= ] => { $ crate :: SyntaxKind :: MINUSEQ } ; [ |= ] => { $ crate :: SyntaxKind :: PIPEEQ } ; [ &= ] => { $ crate :: SyntaxKind :: AMPEQ } ; [ ^= ] => { $ crate :: SyntaxKind :: CARETEQ } ; [ /= ] => { $ crate :: SyntaxKind :: SLASHEQ } ; [ *= ] => { $ crate :: SyntaxKind :: STAREQ } ; [ %= ] => { $ crate :: SyntaxKind :: PERCENTEQ } ; [ && ] => { $ crate :: SyntaxKind :: AMP2 } ; [ || ] => { $ crate :: SyntaxKind :: PIPE2 } ; [ << ] => { $ crate :: SyntaxKind :: SHL } ; [ >> ] => { $ crate :: SyntaxKind :: SHR } ; [ <<= ] => { $ crate :: SyntaxKind :: SHLEQ } ; [ >>= ] => { $ crate :: SyntaxKind :: SHREQ } ; [ as ] => { $ crate :: SyntaxKind :: AS_KW } ; [ async ] => { $ crate :: SyntaxKind :: ASYNC_KW } ; [ await ] => { $ crate :: SyntaxKind :: AWAIT_KW } ; [ box ] => { $ crate :: SyntaxKind :: BOX_KW } ; [ break ] => { $ crate :: SyntaxKind :: BREAK_KW } ; [ const ] => { $ crate :: SyntaxKind :: CONST_KW } ; [ continue ] => { $ crate :: SyntaxKind :: CONTINUE_KW } ; [ crate ] => { $ crate :: SyntaxKind :: CRATE_KW } ; [ dyn ] => { $ crate :: SyntaxKind :: DYN_KW } ; [ else ] => { $ crate :: SyntaxKind :: ELSE_KW } ; [ enum ] => { $ crate :: SyntaxKind :: ENUM_KW } ; [ extern ] => { $ crate :: SyntaxKind :: EXTERN_KW } ; [ false ] => { $ crate :: SyntaxKind :: FALSE_KW } ; [ fn ] => { $ crate :: SyntaxKind :: FN_KW } ; [ for ] => { $ crate :: SyntaxKind :: FOR_KW } ; [ if ] => { $ crate :: SyntaxKind :: IF_KW } ; [ impl ] => { $ crate :: SyntaxKind :: IMPL_KW } ; [ in ] => { $ crate :: SyntaxKind :: IN_KW } ; [ let ] => { $ crate :: SyntaxKind :: LET_KW } ; [ loop ] => { $ crate :: SyntaxKind :: LOOP_KW } ; [ macro ] => { $ crate :: SyntaxKind :: MACRO_KW } ; [ match ] => { $ crate :: SyntaxKind :: MATCH_KW } ; [ mod ] => { $ crate :: SyntaxKind :: MOD_KW } ; [ move ] => { $ crate :: SyntaxKind :: MOVE_KW } ; [ mut ] => { $ crate :: SyntaxKind :: MUT_KW } ; [ pub ] => { $ crate :: SyntaxKind :: PUB_KW } ; [ ref ] => { $ crate :: SyntaxKind :: REF_KW } ; [ return ] => { $ crate :: SyntaxKind :: RETURN_KW } ; [ self ] => { $ crate :: SyntaxKind :: SELF_KW } ; [ static ] => { $ crate :: SyntaxKind :: STATIC_KW } ; [ struct ] => { $ crate :: SyntaxKind :: STRUCT_KW } ; [ super ] => { $ crate :: SyntaxKind :: SUPER_KW } ; [ trait ] => { $ crate :: SyntaxKind :: TRAIT_KW } ; [ true ] => { $ crate :: SyntaxKind :: TRUE_KW } ; [ try ] => { $ crate :: SyntaxKind :: TRY_KW } ; [ type ] => { $ crate :: SyntaxKind :: TYPE_KW } ; [ unsafe ] => { $ crate :: SyntaxKind :: UNSAFE_KW } ; [ use ] => { $ crate :: SyntaxKind :: USE_KW } ; [ where ] => { $ crate :: SyntaxKind :: WHERE_KW } ; [ while ] => { $ crate :: SyntaxKind :: WHILE_KW } ; [ auto ] => { $ crate :: SyntaxKind :: AUTO_KW } ; [ default ] => { $ crate :: SyntaxKind :: DEFAULT_KW } ; [ existential ] => { $ crate :: SyntaxKind :: EXISTENTIAL_KW } ; [ union ] => { $ crate :: SyntaxKind :: UNION_KW } ; [ raw ] => { $ crate :: SyntaxKind :: RAW_KW } ; [ lifetime ] => { $ crate :: SyntaxKind :: LIFETIME } ; [ ident ] => { $ crate :: SyntaxKind :: IDENT } ; } | 367 | macro_rules ! T { [ ; ] => { $ crate :: SyntaxKind :: SEMICOLON } ; [ , ] => { $ crate :: SyntaxKind :: COMMA } ; [ '(' ] => { $ crate :: SyntaxKind :: L_PAREN } ; [ ')' ] => { $ crate :: SyntaxKind :: R_PAREN } ; [ '{' ] => { $ crate :: SyntaxKind :: L_CURLY } ; [ '}' ] => { $ crate :: SyntaxKind :: R_CURLY } ; [ '[' ] => { $ crate :: SyntaxKind :: L_BRACK } ; [ ']' ] => { $ crate :: SyntaxKind :: R_BRACK } ; [ < ] => { $ crate :: SyntaxKind :: L_ANGLE } ; [ > ] => { $ crate :: SyntaxKind :: R_ANGLE } ; [ @ ] => { $ crate :: SyntaxKind :: AT } ; [ # ] => { $ crate :: SyntaxKind :: POUND } ; [ ~ ] => { $ crate :: SyntaxKind :: TILDE } ; [ ? ] => { $ crate :: SyntaxKind :: QUESTION } ; [ $ ] => { $ crate :: SyntaxKind :: DOLLAR } ; [ & ] => { $ crate :: SyntaxKind :: AMP } ; [ | ] => { $ crate :: SyntaxKind :: PIPE } ; [ + ] => { $ crate :: SyntaxKind :: PLUS } ; [ * ] => { $ crate :: SyntaxKind :: STAR } ; [ / ] => { $ crate :: SyntaxKind :: SLASH } ; [ ^ ] => { $ crate :: SyntaxKind :: CARET } ; [ % ] => { $ crate :: SyntaxKind :: PERCENT } ; [ _ ] => { $ crate :: SyntaxKind :: UNDERSCORE } ; [ . ] => { $ crate :: SyntaxKind :: DOT } ; [ .. ] => { $ crate :: SyntaxKind :: DOT2 } ; [ ... ] => { $ crate :: SyntaxKind :: DOT3 } ; [ ..= ] => { $ crate :: SyntaxKind :: DOT2EQ } ; [ : ] => { $ crate :: SyntaxKind :: COLON } ; [ :: ] => { $ crate :: SyntaxKind :: COLON2 } ; [ = ] => { $ crate :: SyntaxKind :: EQ } ; [ == ] => { $ crate :: SyntaxKind :: EQ2 } ; [ => ] => { $ crate :: SyntaxKind :: FAT_ARROW } ; [ ! ] => { $ crate :: SyntaxKind :: BANG } ; [ != ] => { $ crate :: SyntaxKind :: NEQ } ; [ - ] => { $ crate :: SyntaxKind :: MINUS } ; [ -> ] => { $ crate :: SyntaxKind :: THIN_ARROW } ; [ <= ] => { $ crate :: SyntaxKind :: LTEQ } ; [ >= ] => { $ crate :: SyntaxKind :: GTEQ } ; [ += ] => { $ crate :: SyntaxKind :: PLUSEQ } ; [ -= ] => { $ crate :: SyntaxKind :: MINUSEQ } ; [ |= ] => { $ crate :: SyntaxKind :: PIPEEQ } ; [ &= ] => { $ crate :: SyntaxKind :: AMPEQ } ; [ ^= ] => { $ crate :: SyntaxKind :: CARETEQ } ; [ /= ] => { $ crate :: SyntaxKind :: SLASHEQ } ; [ *= ] => { $ crate :: SyntaxKind :: STAREQ } ; [ %= ] => { $ crate :: SyntaxKind :: PERCENTEQ } ; [ && ] => { $ crate :: SyntaxKind :: AMP2 } ; [ || ] => { $ crate :: SyntaxKind :: PIPE2 } ; [ << ] => { $ crate :: SyntaxKind :: SHL } ; [ >> ] => { $ crate :: SyntaxKind :: SHR } ; [ <<= ] => { $ crate :: SyntaxKind :: SHLEQ } ; [ >>= ] => { $ crate :: SyntaxKind :: SHREQ } ; [ as ] => { $ crate :: SyntaxKind :: AS_KW } ; [ async ] => { $ crate :: SyntaxKind :: ASYNC_KW } ; [ await ] => { $ crate :: SyntaxKind :: AWAIT_KW } ; [ box ] => { $ crate :: SyntaxKind :: BOX_KW } ; [ break ] => { $ crate :: SyntaxKind :: BREAK_KW } ; [ const ] => { $ crate :: SyntaxKind :: CONST_KW } ; [ continue ] => { $ crate :: SyntaxKind :: CONTINUE_KW } ; [ crate ] => { $ crate :: SyntaxKind :: CRATE_KW } ; [ dyn ] => { $ crate :: SyntaxKind :: DYN_KW } ; [ else ] => { $ crate :: SyntaxKind :: ELSE_KW } ; [ enum ] => { $ crate :: SyntaxKind :: ENUM_KW } ; [ extern ] => { $ crate :: SyntaxKind :: EXTERN_KW } ; [ false ] => { $ crate :: SyntaxKind :: FALSE_KW } ; [ fn ] => { $ crate :: SyntaxKind :: FN_KW } ; [ for ] => { $ crate :: SyntaxKind :: FOR_KW } ; [ if ] => { $ crate :: SyntaxKind :: IF_KW } ; [ impl ] => { $ crate :: SyntaxKind :: IMPL_KW } ; [ in ] => { $ crate :: SyntaxKind :: IN_KW } ; [ let ] => { $ crate :: SyntaxKind :: LET_KW } ; [ loop ] => { $ crate :: SyntaxKind :: LOOP_KW } ; [ macro ] => { $ crate :: SyntaxKind :: MACRO_KW } ; [ match ] => { $ crate :: SyntaxKind :: MATCH_KW } ; [ mod ] => { $ crate :: SyntaxKind :: MOD_KW } ; [ move ] => { $ crate :: SyntaxKind :: MOVE_KW } ; [ mut ] => { $ crate :: SyntaxKind :: MUT_KW } ; [ pub ] => { $ crate :: SyntaxKind :: PUB_KW } ; [ ref ] => { $ crate :: SyntaxKind :: REF_KW } ; [ return ] => { $ crate :: SyntaxKind :: RETURN_KW } ; [ self ] => { $ crate :: SyntaxKind :: SELF_KW } ; [ static ] => { $ crate :: SyntaxKind :: STATIC_KW } ; [ struct ] => { $ crate :: SyntaxKind :: STRUCT_KW } ; [ super ] => { $ crate :: SyntaxKind :: SUPER_KW } ; [ trait ] => { $ crate :: SyntaxKind :: TRAIT_KW } ; [ true ] => { $ crate :: SyntaxKind :: TRUE_KW } ; [ try ] => { $ crate :: SyntaxKind :: TRY_KW } ; [ type ] => { $ crate :: SyntaxKind :: TYPE_KW } ; [ unsafe ] => { $ crate :: SyntaxKind :: UNSAFE_KW } ; [ use ] => { $ crate :: SyntaxKind :: USE_KW } ; [ where ] => { $ crate :: SyntaxKind :: WHERE_KW } ; [ while ] => { $ crate :: SyntaxKind :: WHILE_KW } ; [ auto ] => { $ crate :: SyntaxKind :: AUTO_KW } ; [ default ] => { $ crate :: SyntaxKind :: DEFAULT_KW } ; [ existential ] => { $ crate :: SyntaxKind :: EXISTENTIAL_KW } ; [ union ] => { $ crate :: SyntaxKind :: UNION_KW } ; [ raw ] => { $ crate :: SyntaxKind :: RAW_KW } ; [ lifetime ] => { $ crate :: SyntaxKind :: LIFETIME } ; [ ident ] => { $ crate :: SyntaxKind :: IDENT } ; [ shebang ] => { $ crate :: SyntaxKind :: SHEBANG } ; } |