1[
2 {"type":"Comment","value":"## Test keywords are identified"},
3 {"type":"Text","value":"\n\n"},
4 {"type":"Keyword","value":"mutable struct"},
5 {"type":"Text","value":" "},
6 {"type":"KeywordType","value":"MutableType"},
7 {"type":"Text","value":" "},
8 {"type":"Keyword","value":"end"},
9 {"type":"Text","value":"\n"},
10 {"type":"Keyword","value":"struct"},
11 {"type":"Text","value":" "},
12 {"type":"KeywordType","value":"ImmutableType"},
13 {"type":"Text","value":" "},
14 {"type":"Keyword","value":"end"},
15 {"type":"Text","value":"\n"},
16 {"type":"Keyword","value":"abstract type"},
17 {"type":"Text","value":" "},
18 {"type":"KeywordType","value":"AbstractMyType"},
19 {"type":"Text","value":" "},
20 {"type":"Keyword","value":"end"},
21 {"type":"Text","value":"\n"},
22 {"type":"Keyword","value":"primitive type"},
23 {"type":"Text","value":" "},
24 {"type":"KeywordType","value":"MyPrimitive"},
25 {"type":"Text","value":" "},
26 {"type":"LiteralNumberInteger","value":"32"},
27 {"type":"Text","value":" "},
28 {"type":"Keyword","value":"end"},
29 {"type":"Text","value":"\n"},
30 {"type":"Punctuation","value":"("},
31 {"type":"Name","value":"abstract"},
32 {"type":"Punctuation","value":","},
33 {"type":"Text","value":" "},
34 {"type":"Name","value":"mutable"},
35 {"type":"Punctuation","value":","},
36 {"type":"Text","value":" "},
37 {"type":"Name","value":"type"},
38 {"type":"Punctuation","value":")"},
39 {"type":"Text","value":" "},
40 {"type":"Operator","value":"="},
41 {"type":"Text","value":" "},
42 {"type":"NameBuiltin","value":"true"},
43 {"type":"Punctuation","value":","},
44 {"type":"Text","value":" "},
45 {"type":"NameBuiltin","value":"π"},
46 {"type":"Punctuation","value":","},
47 {"type":"Text","value":" "},
48 {"type":"NameBuiltin","value":"missing"},
49 {"type":"Text","value":"\n\n"},
50 {"type":"Keyword","value":"abstract type"},
51 {"type":"Text","value":" "},
52 {"type":"KeywordType","value":"AbstractMyType"},
53 {"type":"Text","value":" "},
54 {"type":"Keyword","value":"end"},
55 {"type":"Text","value":"\n"},
56 {"type":"Keyword","value":"primitive type"},
57 {"type":"Text","value":" "},
58 {"type":"KeywordType","value":"MyPrimitive"},
59 {"type":"Text","value":" "},
60 {"type":"LiteralNumberInteger","value":"32"},
61 {"type":"Text","value":" "},
62 {"type":"Keyword","value":"end"},
63 {"type":"Text","value":"\n"},
64 {"type":"Keyword","value":"mutable struct"},
65 {"type":"Text","value":" "},
66 {"type":"KeywordType","value":"MutableType"},
67 {"type":"Text","value":" "},
68 {"type":"Keyword","value":"end"},
69 {"type":"Text","value":"\n\n"},
70 {"type":"Comment","value":"## Test that macros are parsed, including ones which are defined as symbols"},
71 {"type":"Text","value":"\n\n"},
72 {"type":"NameDecorator","value":"@generated"},
73 {"type":"Text","value":" "},
74 {"type":"Keyword","value":"function"},
75 {"type":"Text","value":"\n"},
76 {"type":"NameDecorator","value":"@."},
77 {"type":"Text","value":" "},
78 {"type":"Name","value":"a"},
79 {"type":"Text","value":" "},
80 {"type":"Operator","value":"+"},
81 {"type":"Text","value":" "},
82 {"type":"Name","value":"b"},
83 {"type":"Text","value":"\n"},
84 {"type":"NameDecorator","value":"@~"},
85 {"type":"Text","value":" "},
86 {"type":"Name","value":"a"},
87 {"type":"Text","value":" "},
88 {"type":"Operator","value":"+"},
89 {"type":"Text","value":" "},
90 {"type":"Name","value":"b"},
91 {"type":"Text","value":"\n"},
92 {"type":"NameDecorator","value":"@±"},
93 {"type":"Text","value":" "},
94 {"type":"Name","value":"a"},
95 {"type":"Text","value":" "},
96 {"type":"Operator","value":"+"},
97 {"type":"Text","value":" "},
98 {"type":"Name","value":"b"},
99 {"type":"Text","value":"\n"},
100 {"type":"NameDecorator","value":"@mymacro"},
101 {"type":"Punctuation","value":"("},
102 {"type":"Name","value":"a"},
103 {"type":"Punctuation","value":","},
104 {"type":"Text","value":" "},
105 {"type":"Name","value":"b"},
106 {"type":"Punctuation","value":")"},
107 {"type":"Text","value":"\n"},
108 {"type":"NameDecorator","value":"@+¹ᵀ"},
109 {"type":"Text","value":" "},
110 {"type":"Name","value":"a"},
111 {"type":"Text","value":"\n\n"},
112 {"type":"Comment","value":"## Test that the range of Julia variable names are correctly identified"},
113 {"type":"Text","value":"\n\n"},
114 {"type":"Name","value":"a"},
115 {"type":"Text","value":" "},
116 {"type":"Comment","value":"# single character variable"},
117 {"type":"Text","value":"\n"},
118 {"type":"Name","value":"a_simple_name"},
119 {"type":"Text","value":"\n"},
120 {"type":"Name","value":"_leading_underscore"},
121 {"type":"Text","value":"\n"},
122 {"type":"LiteralNumberInteger","value":"5"},
123 {"type":"Name","value":"implicit_mul"},
124 {"type":"Text","value":"\n"},
125 {"type":"LiteralNumberInteger","value":"6"},
126 {"type":"Name","value":"_more_mul"},
127 {"type":"Text","value":"\n"},
128 {"type":"Name","value":"nums1"},
129 {"type":"Text","value":"\n"},
130 {"type":"Name","value":"nums_2"},
131 {"type":"Text","value":"\n"},
132 {"type":"Name","value":"nameswith!"},
133 {"type":"Text","value":"\n"},
134 {"type":"Name","value":"multiple!!"},
135 {"type":"Text","value":"\n"},
136 {"type":"Name","value":"embedded!_inthemiddle"},
137 {"type":"Text","value":"\n"},
138 {"type":"Name","value":"embed!1"},
139 {"type":"Text","value":"\n"},
140 {"type":"Name","value":"prime_suffix′"},
141 {"type":"Text","value":"\n"},
142 {"type":"Name","value":"for_each"},
143 {"type":"Text","value":" "},
144 {"type":"Comment","value":"# starts with keyword substring"},
145 {"type":"Text","value":"\n\n"},
146 {"type":"Comment","value":"# variables with characters \u003e \\u00A1"},
147 {"type":"Text","value":"\n"},
148 {"type":"Name","value":"ð"},
149 {"type":"Text","value":" "},
150 {"type":"Comment","value":"# category Ll"},
151 {"type":"Text","value":"\n"},
152 {"type":"Name","value":"Aʺ"},
153 {"type":"Text","value":" "},
154 {"type":"Comment","value":"# category Lm -- \\U02BA (MODIFIER LETTER DOUBLE PRIME), not \\U2033 (DOUBLE PRIME)"},
155 {"type":"Text","value":"\n"},
156 {"type":"Name","value":"א"},
157 {"type":"Text","value":" "},
158 {"type":"Comment","value":"# category Lo"},
159 {"type":"Text","value":"\n"},
160 {"type":"Name","value":"Ð"},
161 {"type":"Text","value":" "},
162 {"type":"Comment","value":"# category Lu"},
163 {"type":"Text","value":"\n"},
164 {"type":"Name","value":"A̅"},
165 {"type":"Text","value":" "},
166 {"type":"Comment","value":"# category Mn -- \\U0305 (COMBINING OVERLINE)"},
167 {"type":"Text","value":"\n"},
168 {"type":"Name","value":"ⅿ"},
169 {"type":"Text","value":" "},
170 {"type":"Comment","value":"# category Nl -- \\U217F (SMALL ROMAN NUMERAL ONE THOUSAND)"},
171 {"type":"Text","value":"\n"},
172 {"type":"Name","value":"A₁"},
173 {"type":"Text","value":" "},
174 {"type":"Comment","value":"# category No"},
175 {"type":"Text","value":"\n"},
176 {"type":"Name","value":"A²"},
177 {"type":"Text","value":" "},
178 {"type":"Comment","value":"# category No"},
179 {"type":"Text","value":"\n"},
180 {"type":"Name","value":"€"},
181 {"type":"Text","value":" "},
182 {"type":"Comment","value":"# category Sc"},
183 {"type":"Text","value":"\n"},
184 {"type":"Name","value":"©"},
185 {"type":"Text","value":" "},
186 {"type":"Comment","value":"# category So"},
187 {"type":"Text","value":"\n\n"},
188 {"type":"Comment","value":"# number-like names"},
189 {"type":"Text","value":"\n"},
190 {"type":"Name","value":"𝟙"},
191 {"type":"Text","value":" "},
192 {"type":"Comment","value":"# category Nd"},
193 {"type":"Text","value":"\n"},
194 {"type":"Name","value":"𝟏"},
195 {"type":"Text","value":" "},
196 {"type":"Comment","value":"# category Nd"},
197 {"type":"Text","value":"\n\n"},
198 {"type":"Comment","value":"## Tests identification of number forms"},
199 {"type":"Text","value":"\n\n"},
200 {"type":"Comment","value":"# floats"},
201 {"type":"Text","value":"\n "},
202 {"type":"LiteralNumberFloat","value":"1e1"},
203 {"type":"Text","value":" "},
204 {"type":"LiteralNumberFloat","value":"1e+1"},
205 {"type":"Text","value":" "},
206 {"type":"LiteralNumberFloat","value":"1e-1"},
207 {"type":"Text","value":"\n"},
208 {"type":"LiteralNumberFloat","value":"1.1e1"},
209 {"type":"Text","value":" "},
210 {"type":"LiteralNumberFloat","value":"1.1e+1"},
211 {"type":"Text","value":" "},
212 {"type":"LiteralNumberFloat","value":"1.1e-1"},
213 {"type":"Text","value":" "},
214 {"type":"LiteralNumberFloat","value":".1e1"},
215 {"type":"Text","value":" "},
216 {"type":"LiteralNumberFloat","value":".1_1e1"},
217 {"type":"Text","value":" "},
218 {"type":"LiteralNumberFloat","value":"1_1.1e1"},
219 {"type":"Text","value":" "},
220 {"type":"LiteralNumberFloat","value":"1.1_1e1"},
221 {"type":"Text","value":" "},
222 {"type":"LiteralNumberFloat","value":"1.1_11e1"},
223 {"type":"Text","value":"\n"},
224 {"type":"LiteralNumberFloat","value":"1.1E1"},
225 {"type":"Text","value":" "},
226 {"type":"LiteralNumberFloat","value":"1.1E+1"},
227 {"type":"Text","value":" "},
228 {"type":"LiteralNumberFloat","value":"1.1E-1"},
229 {"type":"Text","value":" "},
230 {"type":"LiteralNumberFloat","value":".1E1"},
231 {"type":"Text","value":" "},
232 {"type":"LiteralNumberFloat","value":".1_1E1"},
233 {"type":"Text","value":" "},
234 {"type":"LiteralNumberFloat","value":"1_1.1E1"},
235 {"type":"Text","value":" "},
236 {"type":"LiteralNumberFloat","value":"1.1_1E1"},
237 {"type":"Text","value":" "},
238 {"type":"LiteralNumberFloat","value":"1.1_11E1"},
239 {"type":"Text","value":"\n"},
240 {"type":"LiteralNumberFloat","value":"1.1f1"},
241 {"type":"Text","value":" "},
242 {"type":"LiteralNumberFloat","value":"1.1f+1"},
243 {"type":"Text","value":" "},
244 {"type":"LiteralNumberFloat","value":"1.1f-1"},
245 {"type":"Text","value":" "},
246 {"type":"LiteralNumberFloat","value":".1f1"},
247 {"type":"Text","value":" "},
248 {"type":"LiteralNumberFloat","value":".1_1f1"},
249 {"type":"Text","value":" "},
250 {"type":"LiteralNumberFloat","value":"1_1.1f1"},
251 {"type":"Text","value":" "},
252 {"type":"LiteralNumberFloat","value":"1.1_1f1"},
253 {"type":"Text","value":" "},
254 {"type":"LiteralNumberFloat","value":"1.1_11f1"},
255 {"type":"Text","value":"\n"},
256 {"type":"LiteralNumberFloat","value":"1E1"},
257 {"type":"Text","value":" "},
258 {"type":"LiteralNumberFloat","value":"1E+1"},
259 {"type":"Text","value":" "},
260 {"type":"LiteralNumberFloat","value":"1E-1"},
261 {"type":"Text","value":"\n"},
262 {"type":"LiteralNumberFloat","value":"1f1"},
263 {"type":"Text","value":" "},
264 {"type":"LiteralNumberFloat","value":"1f+1"},
265 {"type":"Text","value":" "},
266 {"type":"LiteralNumberFloat","value":"1f-1"},
267 {"type":"Text","value":"\n"},
268 {"type":"LiteralNumberFloat","value":".1"},
269 {"type":"Text","value":" "},
270 {"type":"LiteralNumberFloat","value":"1."},
271 {"type":"Text","value":" "},
272 {"type":"LiteralNumberFloat","value":"1.1"},
273 {"type":"Text","value":" "},
274 {"type":"LiteralNumberFloat","value":"1.1_1"},
275 {"type":"Text","value":" "},
276 {"type":"LiteralNumberFloat","value":"1.1_11"},
277 {"type":"Text","value":" "},
278 {"type":"LiteralNumberFloat","value":".1_1"},
279 {"type":"Text","value":" "},
280 {"type":"LiteralNumberFloat","value":".1_11"},
281 {"type":"Text","value":" "},
282 {"type":"LiteralNumberFloat","value":"1_1.1_1"},
283 {"type":"Text","value":"\n"},
284 {"type":"Comment","value":"# hex floats"},
285 {"type":"Text","value":"\n"},
286 {"type":"LiteralNumberFloat","value":"0x1p1"},
287 {"type":"Text","value":" "},
288 {"type":"LiteralNumberFloat","value":"0xa_bp10"},
289 {"type":"Text","value":" "},
290 {"type":"LiteralNumberFloat","value":"0x01_ap11"},
291 {"type":"Text","value":" "},
292 {"type":"LiteralNumberFloat","value":"0x01_abp1"},
293 {"type":"Text","value":"\n"},
294 {"type":"LiteralNumberFloat","value":"0x1.1p1"},
295 {"type":"Text","value":" "},
296 {"type":"LiteralNumberFloat","value":"0xA.Bp10"},
297 {"type":"Text","value":" "},
298 {"type":"LiteralNumberFloat","value":"0x0.1_Ap9"},
299 {"type":"Text","value":" "},
300 {"type":"LiteralNumberFloat","value":"0x0_1.Ap1"},
301 {"type":"Text","value":" "},
302 {"type":"LiteralNumberFloat","value":"0x0_1.A_Bp9"},
303 {"type":"Text","value":"\n\n"},
304 {"type":"Comment","value":"# integers"},
305 {"type":"Text","value":"\n"},
306 {"type":"LiteralNumberInteger","value":"1"},
307 {"type":"Text","value":" "},
308 {"type":"LiteralNumberInteger","value":"01"},
309 {"type":"Text","value":" "},
310 {"type":"LiteralNumberInteger","value":"10_1"},
311 {"type":"Text","value":" "},
312 {"type":"LiteralNumberInteger","value":"10_11"},
313 {"type":"Text","value":"\n\n"},
314 {"type":"Comment","value":"# non-decimal"},
315 {"type":"Text","value":"\n"},
316 {"type":"LiteralNumberHex","value":"0xf"},
317 {"type":"Text","value":" "},
318 {"type":"LiteralNumberHex","value":"0xf_0"},
319 {"type":"Text","value":" "},
320 {"type":"LiteralNumberHex","value":"0xfff_000"},
321 {"type":"Text","value":"\n"},
322 {"type":"LiteralNumberOct","value":"0o7"},
323 {"type":"Text","value":" "},
324 {"type":"LiteralNumberOct","value":"0o7_0"},
325 {"type":"Text","value":" "},
326 {"type":"LiteralNumberOct","value":"0o777_000"},
327 {"type":"Text","value":"\n"},
328 {"type":"LiteralNumberBin","value":"0b1"},
329 {"type":"Text","value":" "},
330 {"type":"LiteralNumberBin","value":"0b1_0"},
331 {"type":"Text","value":" "},
332 {"type":"LiteralNumberBin","value":"0b111_000"},
333 {"type":"Text","value":"\n\n"},
334 {"type":"Comment","value":"# invalid in Julia - out of range values"},
335 {"type":"Text","value":"\n"},
336 {"type":"LiteralNumberInteger","value":"0"},
337 {"type":"Name","value":"xg"},
338 {"type":"Text","value":" "},
339 {"type":"LiteralNumberInteger","value":"0"},
340 {"type":"Name","value":"o8"},
341 {"type":"Text","value":" "},
342 {"type":"LiteralNumberInteger","value":"0"},
343 {"type":"Name","value":"b2"},
344 {"type":"Text","value":" "},
345 {"type":"LiteralNumberHex","value":"0x1"},
346 {"type":"Name","value":"pA"},
347 {"type":"Text","value":"\n"},
348 {"type":"Comment","value":"# invalid in Julia - no trailing underscores"},
349 {"type":"Text","value":"\n"},
350 {"type":"LiteralNumberInteger","value":"1"},
351 {"type":"Name","value":"_"},
352 {"type":"Text","value":" "},
353 {"type":"LiteralNumberFloat","value":"1.1"},
354 {"type":"Name","value":"_"},
355 {"type":"Text","value":" "},
356 {"type":"LiteralNumberHex","value":"0xf"},
357 {"type":"Name","value":"_"},
358 {"type":"Text","value":" "},
359 {"type":"LiteralNumberOct","value":"0o7"},
360 {"type":"Name","value":"_"},
361 {"type":"Text","value":" "},
362 {"type":"LiteralNumberBin","value":"0b1"},
363 {"type":"Name","value":"_"},
364 {"type":"Text","value":" "},
365 {"type":"LiteralNumberHex","value":"0xF"},
366 {"type":"Name","value":"_p1"},
367 {"type":"Text","value":"\n"},
368 {"type":"Comment","value":"# parsed as juxtaposed numeral + variable in Julia (no underscores in exponents)"},
369 {"type":"Text","value":"\n"},
370 {"type":"LiteralNumberFloat","value":"1e1"},
371 {"type":"Name","value":"_1"},
372 {"type":"Text","value":" "},
373 {"type":"LiteralNumberFloat","value":"1E1"},
374 {"type":"Name","value":"_1"},
375 {"type":"Text","value":" "},
376 {"type":"LiteralNumberFloat","value":"1f1"},
377 {"type":"Name","value":"_1"},
378 {"type":"Text","value":" "},
379 {"type":"LiteralNumberFloat","value":"0xfp1"},
380 {"type":"Name","value":"_1"},
381 {"type":"Text","value":"\n\n"},
382 {"type":"Comment","value":"# not floats -- range-like expression parts"},
383 {"type":"Text","value":"\n"},
384 {"type":"LiteralNumberInteger","value":"1"},
385 {"type":"Operator","value":".."},
386 {"type":"LiteralNumberInteger","value":"1"},
387 {"type":"Text","value":" "},
388 {"type":"Operator","value":".."},
389 {"type":"LiteralNumberInteger","value":"1"},
390 {"type":"Text","value":" "},
391 {"type":"LiteralNumberInteger","value":"1"},
392 {"type":"Operator","value":".."},
393 {"type":"Text","value":"\n\n"},
394 {"type":"Comment","value":"## Test that operators --- dotted and unicode --- are identified correctly."},
395 {"type":"Text","value":"\n\n"},
396 {"type":"Name","value":"a"},
397 {"type":"Text","value":" "},
398 {"type":"Operator","value":"+="},
399 {"type":"Text","value":" "},
400 {"type":"Name","value":"b"},
401 {"type":"Operator","value":"."},
402 {"type":"Name","value":"c"},
403 {"type":"Text","value":"\n"},
404 {"type":"Name","value":"a"},
405 {"type":"Text","value":" "},
406 {"type":"Operator","value":".÷="},
407 {"type":"Text","value":" "},
408 {"type":"Operator","value":".~"},
409 {"type":"Name","value":"b"},
410 {"type":"Operator","value":"."},
411 {"type":"Name","value":"c"},
412 {"type":"Text","value":"\n"},
413 {"type":"Name","value":"a"},
414 {"type":"Text","value":" "},
415 {"type":"Operator","value":"="},
416 {"type":"Text","value":" "},
417 {"type":"Operator","value":"!"},
418 {"type":"Name","value":"b"},
419 {"type":"Text","value":" "},
420 {"type":"Operator","value":"⋆"},
421 {"type":"Text","value":" "},
422 {"type":"Name","value":"c!"},
423 {"type":"Text","value":"\n"},
424 {"type":"Name","value":"a"},
425 {"type":"Text","value":" "},
426 {"type":"Operator","value":"="},
427 {"type":"Text","value":" "},
428 {"type":"Name","value":"b"},
429 {"type":"Text","value":" "},
430 {"type":"Operator","value":"?"},
431 {"type":"Text","value":" "},
432 {"type":"Name","value":"c"},
433 {"type":"Text","value":" "},
434 {"type":"Operator","value":":"},
435 {"type":"Text","value":" "},
436 {"type":"Name","value":"d"},
437 {"type":"Text","value":" "},
438 {"type":"Operator","value":"⊕"},
439 {"type":"Text","value":" "},
440 {"type":"Name","value":"e"},
441 {"type":"Text","value":"\n"},
442 {"type":"Name","value":"a"},
443 {"type":"Text","value":" "},
444 {"type":"Operator","value":"="},
445 {"type":"Text","value":" "},
446 {"type":"Operator","value":"√"},
447 {"type":"Punctuation","value":"("},
448 {"type":"LiteralNumberInteger","value":"5"},
449 {"type":"Punctuation","value":")"},
450 {"type":"Text","value":"\n"},
451 {"type":"Name","value":"a"},
452 {"type":"Text","value":" "},
453 {"type":"Operator","value":"-\u003e"},
454 {"type":"Text","value":" "},
455 {"type":"Punctuation","value":"("},
456 {"type":"Name","value":"a"},
457 {"type":"Operator","value":"..."},
458 {"type":"Punctuation","value":")"},
459 {"type":"Text","value":" "},
460 {"type":"Operator","value":".+"},
461 {"type":"Text","value":" "},
462 {"type":"LiteralNumberInteger","value":"1"},
463 {"type":"Text","value":"\n"},
464 {"type":"Name","value":"a"},
465 {"type":"Text","value":" "},
466 {"type":"Operator","value":"\\"},
467 {"type":"Text","value":" "},
468 {"type":"Name","value":"b"},
469 {"type":"Text","value":"\n"},
470 {"type":"LiteralNumberInteger","value":"1"},
471 {"type":"Operator","value":".."},
472 {"type":"LiteralNumberInteger","value":"2"},
473 {"type":"Text","value":"\n"},
474 {"type":"Name","value":"a"},
475 {"type":"Text","value":" "},
476 {"type":"Operator","value":"="},
477 {"type":"Text","value":" "},
478 {"type":"Name","value":"a"},
479 {"type":"Text","value":" "},
480 {"type":"Operator","value":"==="},
481 {"type":"Text","value":" "},
482 {"type":"Name","value":"b"},
483 {"type":"Text","value":"\n"},
484 {"type":"KeywordType","value":"a"},
485 {"type":"Text","value":" "},
486 {"type":"Operator","value":"\u003c:"},
487 {"type":"Text","value":" "},
488 {"type":"KeywordType","value":"T"},
489 {"type":"Text","value":"\n"},
490 {"type":"KeywordType","value":"a"},
491 {"type":"Text","value":" "},
492 {"type":"Operator","value":"\u003e:"},
493 {"type":"Text","value":" "},
494 {"type":"KeywordType","value":"T"},
495 {"type":"Text","value":"\n"},
496 {"type":"Name","value":"a"},
497 {"type":"Operator","value":"::"},
498 {"type":"KeywordType","value":"T"},
499 {"type":"Text","value":"\n"},
500 {"type":"Punctuation","value":"["},
501 {"type":"Name","value":"adjoint"},
502 {"type":"Punctuation","value":"]"},
503 {"type":"Operator","value":"'"},
504 {"type":"Text","value":"\n"},
505 {"type":"Punctuation","value":"("},
506 {"type":"Name","value":"identity"},
507 {"type":"Punctuation","value":")"},
508 {"type":"Operator","value":"''"},
509 {"type":"Text","value":"\n"},
510 {"type":"Name","value":"adjoint"},
511 {"type":"Operator","value":"'''"},
512 {"type":"Text","value":"\n"},
513 {"type":"Name","value":"transpose"},
514 {"type":"Operator","value":"'ᵀ"},
515 {"type":"Text","value":"\n"},
516 {"type":"Name","value":"suffixed"},
517 {"type":"Text","value":" "},
518 {"type":"Operator","value":"+¹"},
519 {"type":"Text","value":" "},
520 {"type":"Name","value":"operator"},
521 {"type":"Text","value":"\n"},
522 {"type":"Name","value":"suffixed"},
523 {"type":"Text","value":" "},
524 {"type":"Operator","value":"+¹²³"},
525 {"type":"Text","value":" "},
526 {"type":"Name","value":"operator"},
527 {"type":"Text","value":"\n\n"},
528 {"type":"Operator","value":"%%"},
529 {"type":"Text","value":" "},
530 {"type":"Name","value":"Test"},
531 {"type":"Text","value":" "},
532 {"type":"Name","value":"string"},
533 {"type":"Text","value":" "},
534 {"type":"Name","value":"forms"},
535 {"type":"Text","value":"\n\n"},
536 {"type":"LiteralString","value":"\"global function\""},
537 {"type":"Text","value":"\n"},
538 {"type":"LiteralString","value":"\"An "},
539 {"type":"LiteralStringInterpol","value":"$interpolated"},
540 {"type":"LiteralString","value":" variable\""},
541 {"type":"Text","value":"\n"},
542 {"type":"LiteralString","value":"\"An "},
543 {"type":"LiteralStringInterpol","value":"$"},
544 {"type":"Punctuation","value":"("},
545 {"type":"Name","value":"a"},
546 {"type":"Text","value":" "},
547 {"type":"Operator","value":"+"},
548 {"type":"Text","value":" "},
549 {"type":"LiteralNumberInteger","value":"1"},
550 {"type":"Punctuation","value":")"},
551 {"type":"LiteralString","value":" expression\""},
552 {"type":"Text","value":"\n"},
553 {"type":"LiteralString","value":"\"\"\"a\"\"\""},
554 {"type":"Text","value":"\n"},
555 {"type":"LiteralString","value":"\"\"\"\nglobal function\nde e f\n\"inner string\"\n\"\"\""},
556 {"type":"Text","value":"\n"},
557 {"type":"LiteralStringAffix","value":"raw"},
558 {"type":"LiteralString","value":"\"\\\\ a "},
559 {"type":"LiteralStringEscape","value":"\\\""},
560 {"type":"LiteralString","value":" $interp $(1 + 1) "},
561 {"type":"LiteralStringEscape","value":"\\\""},
562 {"type":"LiteralString","value":"\""},
563 {"type":"Text","value":"\n"},
564 {"type":"LiteralStringAffix","value":"raw"},
565 {"type":"LiteralString","value":"\"\"\"\n\"inner string\"\n$interp\n$(1 + 1)\n\"\"\""},
566 {"type":"Text","value":"\n"},
567 {"type":"Comment","value":"# commented \"string\""},
568 {"type":"Text","value":"\n\n"},
569 {"type":"NameDecorator","value":"@sprintf"},
570 {"type":"Text","value":" "},
571 {"type":"LiteralString","value":"\""},
572 {"type":"LiteralStringInterpol","value":"%0.2f"},
573 {"type":"LiteralString","value":"\""},
574 {"type":"Text","value":" "},
575 {"type":"Name","value":"var"},
576 {"type":"Text","value":"\n"},
577 {"type":"LiteralStringAffix","value":"v"},
578 {"type":"LiteralString","value":"\"1.0\""},
579 {"type":"Text","value":"\n"},
580 {"type":"LiteralStringAffix","value":"var"},
581 {"type":"LiteralString","value":"\"#nonstandard#\""},
582 {"type":"Text","value":"\n\n"},
583 {"type":"LiteralStringAffix","value":"r"},
584 {"type":"LiteralStringRegex","value":"\"^[abs]+$\""},
585 {"type":"LiteralStringAffix","value":"m"},
586 {"type":"Text","value":"\n"},
587 {"type":"LiteralStringAffix","value":"arbi"},
588 {"type":"LiteralString","value":"\"trary\""},
589 {"type":"LiteralStringAffix","value":"suff"},
590 {"type":"Text","value":"\n"},
591 {"type":"LiteralStringAffix","value":"arbi"},
592 {"type":"LiteralString","value":"\"trary\""},
593 {"type":"LiteralStringAffix","value":"1234"},
594 {"type":"Text","value":"\n\n"},
595 {"type":"LiteralStringBacktick","value":"`global function`"},
596 {"type":"Text","value":"\n"},
597 {"type":"LiteralStringBacktick","value":"`abc "},
598 {"type":"LiteralStringEscape","value":"\\`"},
599 {"type":"LiteralStringBacktick","value":" "},
600 {"type":"LiteralStringEscape","value":"\\$"},
601 {"type":"LiteralStringBacktick","value":" "},
602 {"type":"LiteralStringInterpol","value":"$interpolated"},
603 {"type":"LiteralStringBacktick","value":"`"},
604 {"type":"Text","value":"\n"},
605 {"type":"LiteralStringBacktick","value":"`abc "},
606 {"type":"LiteralStringInterpol","value":"$"},
607 {"type":"Punctuation","value":"("},
608 {"type":"Name","value":"a"},
609 {"type":"Text","value":" "},
610 {"type":"Operator","value":"+"},
611 {"type":"Text","value":" "},
612 {"type":"LiteralNumberInteger","value":"1"},
613 {"type":"Punctuation","value":")"},
614 {"type":"LiteralStringBacktick","value":"`"},
615 {"type":"Text","value":"\n"},
616 {"type":"LiteralStringBacktick","value":"```a```"},
617 {"type":"Text","value":"\n"},
618 {"type":"LiteralStringBacktick","value":"```\nglobal function\n\"thing\" ` "},
619 {"type":"LiteralStringEscape","value":"\\$"},
620 {"type":"LiteralStringBacktick","value":"\n`now` "},
621 {"type":"LiteralStringInterpol","value":"$"},
622 {"type":"Punctuation","value":"("},
623 {"type":"Name","value":"now"},
624 {"type":"Punctuation","value":"())"},
625 {"type":"LiteralStringBacktick","value":"\n```"},
626 {"type":"Text","value":"\n"},
627 {"type":"Comment","value":"# commented `command`"},
628 {"type":"Text","value":"\n\n"},
629 {"type":"LiteralStringAffix","value":"arbi"},
630 {"type":"LiteralStringBacktick","value":"`trary`"},
631 {"type":"LiteralStringAffix","value":"suff"},
632 {"type":"Text","value":"\n"},
633 {"type":"LiteralStringAffix","value":"arbi"},
634 {"type":"LiteralStringBacktick","value":"`trary`"},
635 {"type":"LiteralStringAffix","value":"1234"},
636 {"type":"Text","value":"\n\n"},
637 {"type":"Comment","value":"## Tests that symbols are parsed as special literals"},
638 {"type":"Text","value":"\n\n"},
639 {"type":"LiteralStringSymbol","value":":abc_123"},
640 {"type":"Text","value":"\n"},
641 {"type":"LiteralStringSymbol","value":":abc_def"},
642 {"type":"Text","value":"\n"},
643 {"type":"LiteralStringSymbol","value":":α"},
644 {"type":"Text","value":"\n"},
645 {"type":"KeywordType","value":"Val"},
646 {"type":"Punctuation","value":"{"},
647 {"type":"LiteralStringSymbol","value":":mysymbol"},
648 {"type":"Punctuation","value":"}"},
649 {"type":"Text","value":"\n\n"},
650 {"type":"Comment","value":"# non-symbols"},
651 {"type":"Text","value":"\n"},
652 {"type":"Name","value":"a"},
653 {"type":"Operator","value":":"},
654 {"type":"Name","value":"b"},
655 {"type":"Text","value":"\n"},
656 {"type":"LiteralNumberInteger","value":"1"},
657 {"type":"Operator","value":":"},
658 {"type":"Name","value":"b"},
659 {"type":"Text","value":"\n"},
660 {"type":"LiteralNumberFloat","value":"1."},
661 {"type":"Operator","value":":"},
662 {"type":"Name","value":"b"},
663 {"type":"Text","value":"\n"},
664 {"type":"Name","value":"a"},
665 {"type":"Operator","value":"::"},
666 {"type":"KeywordType","value":"T"},
667 {"type":"Text","value":"\n"},
668 {"type":"KeywordType","value":"a"},
669 {"type":"Operator","value":"\u003c:"},
670 {"type":"KeywordType","value":"T"},
671 {"type":"Text","value":"\n"},
672 {"type":"KeywordType","value":"a"},
673 {"type":"Operator","value":"\u003e:"},
674 {"type":"KeywordType","value":"T"},
675 {"type":"Text","value":"\n"},
676 {"type":"KeywordType","value":"UInt"},
677 {"type":"Punctuation","value":"("},
678 {"type":"LiteralNumberInteger","value":"1"},
679 {"type":"Punctuation","value":")"},
680 {"type":"Operator","value":":"},
681 {"type":"KeywordType","value":"UInt"},
682 {"type":"Punctuation","value":"("},
683 {"type":"LiteralNumberInteger","value":"2"},
684 {"type":"Punctuation","value":")"},
685 {"type":"Text","value":"\n\n"},
686 {"type":"Comment","value":"## Tests identifying names which must be types from context"},
687 {"type":"Text","value":"\n\n"},
688 {"type":"KeywordType","value":"Union"},
689 {"type":"Punctuation","value":"{}"},
690 {"type":"Text","value":"\n"},
691 {"type":"KeywordType","value":"MyType"},
692 {"type":"Punctuation","value":"{"},
693 {"type":"KeywordType","value":"Nothing"},
694 {"type":"Punctuation","value":","},
695 {"type":"Text","value":" "},
696 {"type":"KeywordType","value":"Any"},
697 {"type":"Punctuation","value":"}"},
698 {"type":"Text","value":"\n"},
699 {"type":"Name","value":"f"},
700 {"type":"Punctuation","value":"("},
701 {"type":"Operator","value":"::"},
702 {"type":"KeywordType","value":"Union"},
703 {"type":"Punctuation","value":"{"},
704 {"type":"KeywordType","value":"T"},
705 {"type":"Punctuation","value":","},
706 {"type":"KeywordType","value":"S"},
707 {"type":"Punctuation","value":"})"},
708 {"type":"Text","value":" "},
709 {"type":"Keyword","value":"where"},
710 {"type":"Text","value":" "},
711 {"type":"KeywordType","value":"S"},
712 {"type":"Text","value":" "},
713 {"type":"Keyword","value":"where"},
714 {"type":"Text","value":" "},
715 {"type":"KeywordType","value":"T"},
716 {"type":"Text","value":" "},
717 {"type":"Operator","value":"="},
718 {"type":"Text","value":" "},
719 {"type":"LiteralNumberInteger","value":"1"},
720 {"type":"Text","value":"\n"},
721 {"type":"Name","value":"f"},
722 {"type":"Punctuation","value":"("},
723 {"type":"Operator","value":"::"},
724 {"type":"KeywordType","value":"T"},
725 {"type":"Punctuation","value":")"},
726 {"type":"Text","value":" "},
727 {"type":"Keyword","value":"where"},
728 {"type":"Text","value":" "},
729 {"type":"Punctuation","value":"{"},
730 {"type":"KeywordType","value":"T"},
731 {"type":"Punctuation","value":"}"},
732 {"type":"Text","value":" "},
733 {"type":"Operator","value":"="},
734 {"type":"Text","value":" "},
735 {"type":"LiteralNumberInteger","value":"1"},
736 {"type":"Text","value":"\n"},
737 {"type":"Name","value":"f"},
738 {"type":"Punctuation","value":"("},
739 {"type":"Operator","value":"::"},
740 {"type":"KeywordType","value":"Type"},
741 {"type":"Punctuation","value":"{"},
742 {"type":"Operator","value":"\u003c:"},
743 {"type":"KeywordType","value":"T"},
744 {"type":"Punctuation","value":"})"},
745 {"type":"Text","value":" "},
746 {"type":"Operator","value":"="},
747 {"type":"Text","value":" "},
748 {"type":"LiteralNumberInteger","value":"1"},
749 {"type":"Text","value":"\n"},
750 {"type":"Name","value":"f"},
751 {"type":"Punctuation","value":"("},
752 {"type":"Operator","value":"::"},
753 {"type":"KeywordType","value":"AT"},
754 {"type":"Punctuation","value":")"},
755 {"type":"Text","value":" "},
756 {"type":"Keyword","value":"where"},
757 {"type":"Text","value":" "},
758 {"type":"KeywordType","value":"AT"},
759 {"type":"Text","value":" "},
760 {"type":"Operator","value":"\u003c:"},
761 {"type":"Text","value":" "},
762 {"type":"KeywordType","value":"AbstractArray"},
763 {"type":"Punctuation","value":"{"},
764 {"type":"KeywordType","value":"MyType"},
765 {"type":"Punctuation","value":","},
766 {"type":"LiteralNumberInteger","value":"1"},
767 {"type":"Punctuation","value":"}"},
768 {"type":"Text","value":" "},
769 {"type":"Operator","value":"="},
770 {"type":"Text","value":" "},
771 {"type":"LiteralNumberInteger","value":"1"},
772 {"type":"Text","value":"\n"},
773 {"type":"Name","value":"f"},
774 {"type":"Punctuation","value":"("},
775 {"type":"Operator","value":"::"},
776 {"type":"KeywordType","value":"Val"},
777 {"type":"Punctuation","value":"{"},
778 {"type":"LiteralStringSymbol","value":":named"},
779 {"type":"Punctuation","value":"})"},
780 {"type":"Text","value":" "},
781 {"type":"Operator","value":"="},
782 {"type":"Text","value":" "},
783 {"type":"LiteralNumberInteger","value":"1"},
784 {"type":"Text","value":"\n"},
785 {"type":"Name","value":"f"},
786 {"type":"Punctuation","value":"("},
787 {"type":"Operator","value":"::"},
788 {"type":"Name","value":"typeof"},
789 {"type":"Punctuation","value":"("},
790 {"type":"Name","value":"sin"},
791 {"type":"Punctuation","value":"))"},
792 {"type":"Text","value":" "},
793 {"type":"Operator","value":"="},
794 {"type":"Text","value":" "},
795 {"type":"LiteralNumberInteger","value":"1"},
796 {"type":"Text","value":"\n"},
797 {"type":"KeywordType","value":"MyInt"},
798 {"type":"Text","value":" "},
799 {"type":"Operator","value":"\u003c:"},
800 {"type":"Text","value":" "},
801 {"type":"KeywordType","value":"Integer"},
802 {"type":"Text","value":"\n"},
803 {"type":"KeywordType","value":"Number"},
804 {"type":"Text","value":" "},
805 {"type":"Operator","value":"\u003e:"},
806 {"type":"Text","value":" "},
807 {"type":"KeywordType","value":"MyInt"},
808 {"type":"Text","value":"\n"},
809 {"type":"KeywordType","value":"AT"},
810 {"type":"Punctuation","value":"{"},
811 {"type":"KeywordType","value":"T"},
812 {"type":"Punctuation","value":","},
813 {"type":"LiteralNumberInteger","value":"1"},
814 {"type":"Punctuation","value":"}"},
815 {"type":"Text","value":" "},
816 {"type":"Operator","value":"\u003c:"},
817 {"type":"Text","value":" "},
818 {"type":"KeywordType","value":"B"},
819 {"type":"Text","value":"\n"},
820 {"type":"KeywordType","value":"B"},
821 {"type":"Operator","value":"\u003e:"},
822 {"type":"KeywordType","value":"AT"},
823 {"type":"Punctuation","value":"{"},
824 {"type":"KeywordType","value":"T"},
825 {"type":"Punctuation","value":","},
826 {"type":"LiteralNumberInteger","value":"1"},
827 {"type":"Punctuation","value":"}"},
828 {"type":"Text","value":"\n"},
829 {"type":"KeywordType","value":"A"},
830 {"type":"Text","value":" "},
831 {"type":"Operator","value":"\u003c:"},
832 {"type":"Text","value":" "},
833 {"type":"Name","value":"f"},
834 {"type":"Punctuation","value":"("},
835 {"type":"Name","value":"B"},
836 {"type":"Punctuation","value":")"},
837 {"type":"Text","value":"\n"},
838 {"type":"Name","value":"g"},
839 {"type":"Punctuation","value":"("},
840 {"type":"Name","value":"C"},
841 {"type":"Punctuation","value":")"},
842 {"type":"Text","value":" "},
843 {"type":"Operator","value":"\u003c:"},
844 {"type":"Text","value":" "},
845 {"type":"KeywordType","value":"T"},
846 {"type":"Text","value":"\n"}
847]
View as plain text