aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_parser
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_parser')
-rw-r--r--crates/ra_parser/Cargo.toml1
-rw-r--r--crates/ra_parser/src/grammar.rs20
-rw-r--r--crates/ra_parser/src/grammar/expressions.rs6
-rw-r--r--crates/ra_parser/src/grammar/items.rs18
-rw-r--r--crates/ra_parser/src/grammar/items/adt.rs18
-rw-r--r--crates/ra_parser/src/grammar/items/consts.rs4
-rw-r--r--crates/ra_parser/src/grammar/items/traits.rs4
-rw-r--r--crates/ra_parser/src/grammar/items/use_item.rs2
-rw-r--r--crates/ra_parser/src/grammar/type_params.rs2
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs50
10 files changed, 65 insertions, 60 deletions
diff --git a/crates/ra_parser/Cargo.toml b/crates/ra_parser/Cargo.toml
index 0da581fd5..72ec3e4d9 100644
--- a/crates/ra_parser/Cargo.toml
+++ b/crates/ra_parser/Cargo.toml
@@ -4,6 +4,7 @@ name = "ra_parser"
4version = "0.1.0" 4version = "0.1.0"
5authors = ["rust-analyzer developers"] 5authors = ["rust-analyzer developers"]
6publish = false 6publish = false
7license = "MIT OR Apache-2.0"
7 8
8[lib] 9[lib]
9doctest = false 10doctest = false
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/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
313pub(crate) fn extern_item_list(p: &mut Parser) { 319pub(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
380pub(crate) fn mod_item(p: &mut Parser, m: Marker) { 386pub(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::*;
5pub(super) fn struct_def(p: &mut Parser, m: Marker) { 5pub(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
11pub(super) fn union_def(p: &mut Parser, m: Marker) { 11pub(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
17fn struct_or_union(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { 17fn 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
70pub(crate) fn enum_variant_list(p: &mut Parser) { 70pub(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
107pub(crate) fn record_field_def_list(p: &mut Parser) { 107pub(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 @@
3use super::*; 3use super::*;
4 4
5pub(super) fn static_def(p: &mut Parser, m: Marker) { 5pub(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
9pub(super) fn const_def(p: &mut Parser, m: Marker) { 9pub(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
13fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { 13fn 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/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
42fn lifetime_param(p: &mut Parser, m: Marker) { 42fn lifetime_param(p: &mut Parser, m: Marker) {
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs
index e7404492a..be4da67bc 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)]
7pub enum SyntaxKind { 7pub 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,
@@ -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,7 +230,8 @@ 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,
@@ -362,4 +364,4 @@ impl SyntaxKind {
362 } 364 }
363} 365}
364#[macro_export] 366#[macro_export]
365macro_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 } ; } 367macro_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 } ; }