summaryrefslogtreecommitdiffstats
path: root/misc/syntax/ts.syntax
blob: d21f1c82a0a0606843901017adf5215bcb357b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
#
# TypeScript syntax highlighting
# for MC Editor/CoolEdit
#
# Authors:
#    * Oleksandr Sidko <mortiy@gmail.com>
#    * Timur Shemsedinov <timur.shemsedinov@gmail.com>
# Based on js.syntax
#

context default


    #=========================
    # Keywords
    keyword whole abstract yellow
    keyword whole arguments yellow
    keyword whole as yellow
    keyword whole async yellow
    keyword whole await yellow
    keyword whole break yellow
    keyword whole caller yellow
    keyword whole case yellow
    keyword whole catch yellow
    keyword whole class yellow
    keyword whole constructor yellow
    keyword whole const yellow
    keyword whole continue yellow
    keyword whole debugger yellow
    keyword whole declare yellow
    keyword whole default yellow
    keyword whole delete yellow
    keyword whole do yellow
    keyword whole else yellow
    keyword whole enum yellow
    keyword whole export yellow
    keyword whole extends yellow
    keyword whole finally yellow
    keyword whole for yellow
    keyword whole from yellow
    keyword whole function yellow
    keyword whole get yellow
    keyword whole if yellow
    keyword whole implements yellow
    keyword whole import yellow
    keyword whole instanceof yellow
    keyword whole interface yellow
    keyword whole in yellow
    keyword whole let yellow
    keyword whole module yellow
    keyword whole namespace yellow
    keyword whole new yellow
    keyword whole of yellow
    keyword whole private yellow
    keyword whole protected yellow
    keyword whole prototype yellow
    keyword whole public yellow
    keyword whole readonly yellow
    keyword whole return yellow
    keyword whole set yellow
    keyword whole static yellow
    keyword whole super yellow
    keyword whole switch yellow
    keyword whole this yellow
    keyword whole throw yellow
    keyword whole try yellow
    keyword whole typeof yellow
    keyword whole var yellow
    keyword whole while yellow
    keyword whole with yellow
    keyword whole yield yellow

    #=========================
    # Basic Types
    keyword whole any cyan
    keyword whole bigint cyan
    keyword whole boolean cyan
    keyword whole never cyan
    keyword whole null cyan
    keyword whole number cyan
    keyword whole object cyan
    keyword whole string cyan
    keyword whole symbol cyan
    keyword whole undefined cyan
    keyword whole unknown cyan
    keyword whole void cyan
    keyword whole T cyan

    #=========================
    # Objects
    keyword whole AbortController yellow
    keyword whole AbortSignal yellow
    keyword whole AggregateError yellow
    keyword whole Array yellow
    keyword whole ArrayBuffer yellow
    keyword whole AsyncFunction yellow
    keyword whole AsyncGenerator yellow
    keyword whole AsyncGeneratorFunction yellow
    keyword whole Atomics yellow
    keyword whole BigInt64Array yellow
    keyword whole BigInt yellow
    keyword whole BigUint64Array yellow
    keyword whole Blob yellowOB
    keyword whole Boolean yellow
    keyword whole Buffer yellow
    keyword whole DataView yellow
    keyword whole Date yellow
    keyword whole DOMException yellow
    keyword whole Error yellow
    keyword whole EvalError yellow
    keyword whole Float32Array yellow
    keyword whole Float64Array yellow
    keyword whole Function yellow
    keyword whole Generator yellow
    keyword whole GeneratorFunction yellow
    keyword whole global yellow
    keyword whole globalThis yellow
    keyword whole Image yellow
    keyword whole Infinity yellow
    keyword whole Int16Array yellow
    keyword whole Int32Array yellow
    keyword whole Int8Array yellow
    keyword whole Intl yellow
    keyword whole JSON yellow
    keyword whole Map yellow
    keyword whole Math yellow
    keyword whole Number yellow
    keyword whole Object yellow
    keyword whole Promise yellow
    keyword whole Promise yellow
    keyword whole Proxy yellow
    keyword whole RangeError yellow
    keyword whole ReferenceError yellow
    keyword whole Reflect yellow
    keyword whole RegExp yellow
    keyword whole Set yellow
    keyword whole SharedArrayBuffer yellow
    keyword whole SyntaxError yellow
    keyword whole TextDecoder yellow
    keyword whole TypeError yellow
    keyword whole Uint16Array yellow
    keyword whole Uint32Array yellow
    keyword whole Uint8Array yellow
    keyword whole Uint8ClampedArray yellow
    keyword whole URIError yellow
    keyword whole URL yellow
    keyword whole URLSearchParams yellow
    keyword whole WeakMap yellow
    keyword whole WeakSet yellow
    keyword whole WebAssembly yellow
    keyword whole window yellow

    #=========================
    # Most common functions
    keyword whole alert yellow
    keyword whole clearInterval yellow
    keyword whole clearTimeout yellow
    keyword whole console yellow
    keyword whole decodeURIComponent yellow
    keyword whole decodeURI yellow
    keyword whole encodeURIComponent yellow
    keyword whole escape yellow
    keyword whole eval yellow
    keyword whole fetch yellow
    keyword whole isFinite yellow
    keyword whole isNaN yellow
    keyword whole module yellow
    keyword whole parseFloat yellow
    keyword whole parseInt yellow
    keyword whole performance yellow
    keyword whole process yellow
    keyword whole queueMicrotask yellow
    keyword whole require yellow
    keyword whole setImmediate yellow
    keyword whole setInterval yellow
    keyword whole setTimeout yellow
    keyword whole structuredClone yellow
    keyword whole unescape yellow

    #=========================
    # Constants
    keyword whole true brightgreen
    keyword whole false brightgreen
    keyword whole NaN yellow
    keyword whole __dirname yellow
    keyword whole __filename yellow

    #=========================
    # Comments
    keyword /\* brown
    keyword \*/ brown
    keyword // brown

    #=========================
    # Numbers
    wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.

    keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen
    keyword whole \{0123456789\}\[0123456789\] brightgreen
    keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
    keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen
    keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
    keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
    keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
    keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen

    #=========================
    # Special symbols
    keyword <+> cyan
    keyword => brightcyan
    keyword \. yellow
    keyword \* yellow
    keyword \+ yellow
    keyword - yellow
    keyword / yellow
    keyword % yellow
    keyword = yellow
    keyword ! yellow
    keyword & yellow
    keyword | yellow
    keyword ^ yellow
    keyword ~ yellow
    keyword > yellow
    keyword < yellow
    keyword wholeright @+ cyan

    #=========================
    # Separators
    keyword { brightcyan
    keyword } brightcyan
    keyword ( brightcyan
    keyword ) brightcyan
    keyword [ brightcyan
    keyword ] brightcyan
    keyword , brightcyan
    keyword ? brightcyan
    keyword : brightcyan
    keyword ; brightmagenta

# Function return type
context exclusive wholeright ): \n cyan
    keyword ; brightmagenta
    keyword { brightcyan

#=============================
# Comments

context exclusive /\* \*/ brown
    spellcheck
    keyword whole BUG brightred
    keyword whole FixMe brightred
    keyword whole FIXME brightred
    keyword whole Note brightred
    keyword whole NOTE brightred
    keyword whole ToDo brightred
    keyword whole TODO brightred
    keyword !!\[!\] brightred
    keyword ??\[?\] brightred


context exclusive // \n brown
    spellcheck
    keyword whole BUG brightred
    keyword whole FixMe brightred
    keyword whole FIXME brightred
    keyword whole Note brightred
    keyword whole NOTE brightred
    keyword whole ToDo brightred
    keyword whole TODO brightred
    keyword !!\[!\] brightred
    keyword ??\[?\] brightred


#=============================
# Strings

context " " green
    spellcheck
    keyword \\\{\\'"abtnvfr\} brightgreen
    keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen

    keyword ' brightgreen

context ' ' green
    spellcheck
    keyword \\\{\\'"abtnvfr\} brightgreen
    keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen

    keyword " brightgreen

context ` ` green
    spellcheck
    keyword \\\{\\'"abtnvfr\} brightgreen
    keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
    keyword ${*} yellow