diff options
Diffstat (limited to 'src/syntax_kinds.rs')
-rw-r--r-- | src/syntax_kinds.rs | 141 |
1 files changed, 73 insertions, 68 deletions
diff --git a/src/syntax_kinds.rs b/src/syntax_kinds.rs index 8bc63a210..5ab8b934b 100644 --- a/src/syntax_kinds.rs +++ b/src/syntax_kinds.rs | |||
@@ -17,74 +17,76 @@ pub const PUB_KW: SyntaxKind = SyntaxKind(12); | |||
17 | pub const SELF_KW: SyntaxKind = SyntaxKind(13); | 17 | pub const SELF_KW: SyntaxKind = SyntaxKind(13); |
18 | pub const SUPER_KW: SyntaxKind = SyntaxKind(14); | 18 | pub const SUPER_KW: SyntaxKind = SyntaxKind(14); |
19 | pub const IN_KW: SyntaxKind = SyntaxKind(15); | 19 | pub const IN_KW: SyntaxKind = SyntaxKind(15); |
20 | pub const ERROR: SyntaxKind = SyntaxKind(16); | 20 | pub const WHERE_KW: SyntaxKind = SyntaxKind(16); |
21 | pub const IDENT: SyntaxKind = SyntaxKind(17); | 21 | pub const ERROR: SyntaxKind = SyntaxKind(17); |
22 | pub const UNDERSCORE: SyntaxKind = SyntaxKind(18); | 22 | pub const IDENT: SyntaxKind = SyntaxKind(18); |
23 | pub const WHITESPACE: SyntaxKind = SyntaxKind(19); | 23 | pub const UNDERSCORE: SyntaxKind = SyntaxKind(19); |
24 | pub const INT_NUMBER: SyntaxKind = SyntaxKind(20); | 24 | pub const WHITESPACE: SyntaxKind = SyntaxKind(20); |
25 | pub const FLOAT_NUMBER: SyntaxKind = SyntaxKind(21); | 25 | pub const INT_NUMBER: SyntaxKind = SyntaxKind(21); |
26 | pub const SEMI: SyntaxKind = SyntaxKind(22); | 26 | pub const FLOAT_NUMBER: SyntaxKind = SyntaxKind(22); |
27 | pub const COMMA: SyntaxKind = SyntaxKind(23); | 27 | pub const SEMI: SyntaxKind = SyntaxKind(23); |
28 | pub const DOT: SyntaxKind = SyntaxKind(24); | 28 | pub const COMMA: SyntaxKind = SyntaxKind(24); |
29 | pub const DOTDOT: SyntaxKind = SyntaxKind(25); | 29 | pub const DOT: SyntaxKind = SyntaxKind(25); |
30 | pub const DOTDOTDOT: SyntaxKind = SyntaxKind(26); | 30 | pub const DOTDOT: SyntaxKind = SyntaxKind(26); |
31 | pub const DOTDOTEQ: SyntaxKind = SyntaxKind(27); | 31 | pub const DOTDOTDOT: SyntaxKind = SyntaxKind(27); |
32 | pub const L_PAREN: SyntaxKind = SyntaxKind(28); | 32 | pub const DOTDOTEQ: SyntaxKind = SyntaxKind(28); |
33 | pub const R_PAREN: SyntaxKind = SyntaxKind(29); | 33 | pub const L_PAREN: SyntaxKind = SyntaxKind(29); |
34 | pub const L_CURLY: SyntaxKind = SyntaxKind(30); | 34 | pub const R_PAREN: SyntaxKind = SyntaxKind(30); |
35 | pub const R_CURLY: SyntaxKind = SyntaxKind(31); | 35 | pub const L_CURLY: SyntaxKind = SyntaxKind(31); |
36 | pub const L_BRACK: SyntaxKind = SyntaxKind(32); | 36 | pub const R_CURLY: SyntaxKind = SyntaxKind(32); |
37 | pub const R_BRACK: SyntaxKind = SyntaxKind(33); | 37 | pub const L_BRACK: SyntaxKind = SyntaxKind(33); |
38 | pub const L_ANGLE: SyntaxKind = SyntaxKind(34); | 38 | pub const R_BRACK: SyntaxKind = SyntaxKind(34); |
39 | pub const R_ANGLE: SyntaxKind = SyntaxKind(35); | 39 | pub const L_ANGLE: SyntaxKind = SyntaxKind(35); |
40 | pub const AT: SyntaxKind = SyntaxKind(36); | 40 | pub const R_ANGLE: SyntaxKind = SyntaxKind(36); |
41 | pub const POUND: SyntaxKind = SyntaxKind(37); | 41 | pub const AT: SyntaxKind = SyntaxKind(37); |
42 | pub const TILDE: SyntaxKind = SyntaxKind(38); | 42 | pub const POUND: SyntaxKind = SyntaxKind(38); |
43 | pub const QUESTION: SyntaxKind = SyntaxKind(39); | 43 | pub const TILDE: SyntaxKind = SyntaxKind(39); |
44 | pub const COLON: SyntaxKind = SyntaxKind(40); | 44 | pub const QUESTION: SyntaxKind = SyntaxKind(40); |
45 | pub const COLONCOLON: SyntaxKind = SyntaxKind(41); | 45 | pub const COLON: SyntaxKind = SyntaxKind(41); |
46 | pub const DOLLAR: SyntaxKind = SyntaxKind(42); | 46 | pub const COLONCOLON: SyntaxKind = SyntaxKind(42); |
47 | pub const EQ: SyntaxKind = SyntaxKind(43); | 47 | pub const DOLLAR: SyntaxKind = SyntaxKind(43); |
48 | pub const EQEQ: SyntaxKind = SyntaxKind(44); | 48 | pub const EQ: SyntaxKind = SyntaxKind(44); |
49 | pub const FAT_ARROW: SyntaxKind = SyntaxKind(45); | 49 | pub const EQEQ: SyntaxKind = SyntaxKind(45); |
50 | pub const NEQ: SyntaxKind = SyntaxKind(46); | 50 | pub const FAT_ARROW: SyntaxKind = SyntaxKind(46); |
51 | pub const EXCL: SyntaxKind = SyntaxKind(47); | 51 | pub const NEQ: SyntaxKind = SyntaxKind(47); |
52 | pub const LIFETIME: SyntaxKind = SyntaxKind(48); | 52 | pub const EXCL: SyntaxKind = SyntaxKind(48); |
53 | pub const CHAR: SyntaxKind = SyntaxKind(49); | 53 | pub const LIFETIME: SyntaxKind = SyntaxKind(49); |
54 | pub const BYTE: SyntaxKind = SyntaxKind(50); | 54 | pub const CHAR: SyntaxKind = SyntaxKind(50); |
55 | pub const STRING: SyntaxKind = SyntaxKind(51); | 55 | pub const BYTE: SyntaxKind = SyntaxKind(51); |
56 | pub const RAW_STRING: SyntaxKind = SyntaxKind(52); | 56 | pub const STRING: SyntaxKind = SyntaxKind(52); |
57 | pub const BYTE_STRING: SyntaxKind = SyntaxKind(53); | 57 | pub const RAW_STRING: SyntaxKind = SyntaxKind(53); |
58 | pub const RAW_BYTE_STRING: SyntaxKind = SyntaxKind(54); | 58 | pub const BYTE_STRING: SyntaxKind = SyntaxKind(54); |
59 | pub const PLUS: SyntaxKind = SyntaxKind(55); | 59 | pub const RAW_BYTE_STRING: SyntaxKind = SyntaxKind(55); |
60 | pub const MINUS: SyntaxKind = SyntaxKind(56); | 60 | pub const PLUS: SyntaxKind = SyntaxKind(56); |
61 | pub const STAR: SyntaxKind = SyntaxKind(57); | 61 | pub const MINUS: SyntaxKind = SyntaxKind(57); |
62 | pub const SLASH: SyntaxKind = SyntaxKind(58); | 62 | pub const STAR: SyntaxKind = SyntaxKind(58); |
63 | pub const CARET: SyntaxKind = SyntaxKind(59); | 63 | pub const SLASH: SyntaxKind = SyntaxKind(59); |
64 | pub const PERCENT: SyntaxKind = SyntaxKind(60); | 64 | pub const CARET: SyntaxKind = SyntaxKind(60); |
65 | pub const AMPERSAND: SyntaxKind = SyntaxKind(61); | 65 | pub const PERCENT: SyntaxKind = SyntaxKind(61); |
66 | pub const PIPE: SyntaxKind = SyntaxKind(62); | 66 | pub const AMPERSAND: SyntaxKind = SyntaxKind(62); |
67 | pub const THIN_ARROW: SyntaxKind = SyntaxKind(63); | 67 | pub const PIPE: SyntaxKind = SyntaxKind(63); |
68 | pub const COMMENT: SyntaxKind = SyntaxKind(64); | 68 | pub const THIN_ARROW: SyntaxKind = SyntaxKind(64); |
69 | pub const DOC_COMMENT: SyntaxKind = SyntaxKind(65); | 69 | pub const COMMENT: SyntaxKind = SyntaxKind(65); |
70 | pub const SHEBANG: SyntaxKind = SyntaxKind(66); | 70 | pub const DOC_COMMENT: SyntaxKind = SyntaxKind(66); |
71 | pub const FILE: SyntaxKind = SyntaxKind(67); | 71 | pub const SHEBANG: SyntaxKind = SyntaxKind(67); |
72 | pub const STRUCT_ITEM: SyntaxKind = SyntaxKind(68); | 72 | pub const FILE: SyntaxKind = SyntaxKind(68); |
73 | pub const STRUCT_FIELD: SyntaxKind = SyntaxKind(69); | 73 | pub const STRUCT_ITEM: SyntaxKind = SyntaxKind(69); |
74 | pub const FN_ITEM: SyntaxKind = SyntaxKind(70); | 74 | pub const NAMED_FIELD: SyntaxKind = SyntaxKind(70); |
75 | pub const EXTERN_CRATE_ITEM: SyntaxKind = SyntaxKind(71); | 75 | pub const POS_FIELD: SyntaxKind = SyntaxKind(71); |
76 | pub const ATTR: SyntaxKind = SyntaxKind(72); | 76 | pub const FN_ITEM: SyntaxKind = SyntaxKind(72); |
77 | pub const META_ITEM: SyntaxKind = SyntaxKind(73); | 77 | pub const EXTERN_CRATE_ITEM: SyntaxKind = SyntaxKind(73); |
78 | pub const MOD_ITEM: SyntaxKind = SyntaxKind(74); | 78 | pub const ATTR: SyntaxKind = SyntaxKind(74); |
79 | pub const USE_ITEM: SyntaxKind = SyntaxKind(75); | 79 | pub const META_ITEM: SyntaxKind = SyntaxKind(75); |
80 | pub const USE_TREE: SyntaxKind = SyntaxKind(76); | 80 | pub const MOD_ITEM: SyntaxKind = SyntaxKind(76); |
81 | pub const PATH: SyntaxKind = SyntaxKind(77); | 81 | pub const USE_ITEM: SyntaxKind = SyntaxKind(77); |
82 | pub const PATH_SEGMENT: SyntaxKind = SyntaxKind(78); | 82 | pub const USE_TREE: SyntaxKind = SyntaxKind(78); |
83 | pub const LITERAL: SyntaxKind = SyntaxKind(79); | 83 | pub const PATH: SyntaxKind = SyntaxKind(79); |
84 | pub const ALIAS: SyntaxKind = SyntaxKind(80); | 84 | pub const PATH_SEGMENT: SyntaxKind = SyntaxKind(80); |
85 | pub const VISIBILITY: SyntaxKind = SyntaxKind(81); | 85 | pub const LITERAL: SyntaxKind = SyntaxKind(81); |
86 | pub const ALIAS: SyntaxKind = SyntaxKind(82); | ||
87 | pub const VISIBILITY: SyntaxKind = SyntaxKind(83); | ||
86 | 88 | ||
87 | static INFOS: [SyntaxInfo; 82] = [ | 89 | static INFOS: [SyntaxInfo; 84] = [ |
88 | SyntaxInfo { name: "USE_KW" }, | 90 | SyntaxInfo { name: "USE_KW" }, |
89 | SyntaxInfo { name: "FN_KW" }, | 91 | SyntaxInfo { name: "FN_KW" }, |
90 | SyntaxInfo { name: "STRUCT_KW" }, | 92 | SyntaxInfo { name: "STRUCT_KW" }, |
@@ -101,6 +103,7 @@ static INFOS: [SyntaxInfo; 82] = [ | |||
101 | SyntaxInfo { name: "SELF_KW" }, | 103 | SyntaxInfo { name: "SELF_KW" }, |
102 | SyntaxInfo { name: "SUPER_KW" }, | 104 | SyntaxInfo { name: "SUPER_KW" }, |
103 | SyntaxInfo { name: "IN_KW" }, | 105 | SyntaxInfo { name: "IN_KW" }, |
106 | SyntaxInfo { name: "WHERE_KW" }, | ||
104 | SyntaxInfo { name: "ERROR" }, | 107 | SyntaxInfo { name: "ERROR" }, |
105 | SyntaxInfo { name: "IDENT" }, | 108 | SyntaxInfo { name: "IDENT" }, |
106 | SyntaxInfo { name: "UNDERSCORE" }, | 109 | SyntaxInfo { name: "UNDERSCORE" }, |
@@ -154,7 +157,8 @@ static INFOS: [SyntaxInfo; 82] = [ | |||
154 | SyntaxInfo { name: "SHEBANG" }, | 157 | SyntaxInfo { name: "SHEBANG" }, |
155 | SyntaxInfo { name: "FILE" }, | 158 | SyntaxInfo { name: "FILE" }, |
156 | SyntaxInfo { name: "STRUCT_ITEM" }, | 159 | SyntaxInfo { name: "STRUCT_ITEM" }, |
157 | SyntaxInfo { name: "STRUCT_FIELD" }, | 160 | SyntaxInfo { name: "NAMED_FIELD" }, |
161 | SyntaxInfo { name: "POS_FIELD" }, | ||
158 | SyntaxInfo { name: "FN_ITEM" }, | 162 | SyntaxInfo { name: "FN_ITEM" }, |
159 | SyntaxInfo { name: "EXTERN_CRATE_ITEM" }, | 163 | SyntaxInfo { name: "EXTERN_CRATE_ITEM" }, |
160 | SyntaxInfo { name: "ATTR" }, | 164 | SyntaxInfo { name: "ATTR" }, |
@@ -191,6 +195,7 @@ pub(crate) fn ident_to_keyword(ident: &str) -> Option<SyntaxKind> { | |||
191 | "self" => Some(SELF_KW), | 195 | "self" => Some(SELF_KW), |
192 | "super" => Some(SUPER_KW), | 196 | "super" => Some(SUPER_KW), |
193 | "in" => Some(IN_KW), | 197 | "in" => Some(IN_KW), |
198 | "where" => Some(WHERE_KW), | ||
194 | _ => None, | 199 | _ => None, |
195 | } | 200 | } |
196 | } | 201 | } |