monaco-editor11 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/monaco-editor11.es.js +55 -0
  2. package/dist/monaco-editor11.umd.js +1 -0
  3. package/package.json +2 -1
  4. package/dist/abap-CrvW7_qN.mjs +0 -1398
  5. package/dist/apex-BAOI8p1v.mjs +0 -327
  6. package/dist/azcli-BlCk_UqW.mjs +0 -68
  7. package/dist/bat-DPoEelVx.mjs +0 -100
  8. package/dist/bicep-Cp1F394l.mjs +0 -102
  9. package/dist/cameligo-CWqtSlQs.mjs +0 -174
  10. package/dist/clojure-CKBp32Gf.mjs +0 -761
  11. package/dist/coffee-CDo6vc-J.mjs +0 -232
  12. package/dist/cpp-DokufPgf.mjs +0 -389
  13. package/dist/csharp-BQi3szM0.mjs +0 -326
  14. package/dist/csp-BSGtCCZ-.mjs +0 -53
  15. package/dist/css-DEPFDJfb.mjs +0 -187
  16. package/dist/cssMode-BhKA1zSu.mjs +0 -141
  17. package/dist/cypher-DAb1vOxS.mjs +0 -263
  18. package/dist/dart-C8p4jewR.mjs +0 -281
  19. package/dist/dockerfile-DP0iLFPN.mjs +0 -130
  20. package/dist/ecl-BDQHA6fi.mjs +0 -456
  21. package/dist/elixir-D4II6kDM.mjs +0 -569
  22. package/dist/flow9-StcnL-VB.mjs +0 -142
  23. package/dist/freemarker2-ww_D58dk.mjs +0 -982
  24. package/dist/fsharp-DdUVp3EN.mjs +0 -217
  25. package/dist/go-D1-I258M.mjs +0 -218
  26. package/dist/graphql-DWkL3f8U.mjs +0 -151
  27. package/dist/handlebars-p6e472fk.mjs +0 -412
  28. package/dist/hb-vue3-print-nb.es.js +0 -24
  29. package/dist/hb-vue3-print-nb.umd.js +0 -1234
  30. package/dist/hcl-D_0MNifv.mjs +0 -183
  31. package/dist/html-RxjjEvRj.mjs +0 -301
  32. package/dist/htmlMode-CJ7jqvHB.mjs +0 -152
  33. package/dist/index-D22E33Ns.mjs +0 -128804
  34. package/dist/ini-C4I2-MT7.mjs +0 -71
  35. package/dist/java-OBvaP_SS.mjs +0 -232
  36. package/dist/javascript-4cugaJH-.mjs +0 -70
  37. package/dist/jsonMode-mEAKo0MB.mjs +0 -577
  38. package/dist/julia-BmDH8Kkf.mjs +0 -511
  39. package/dist/kotlin-Dhu5AGOD.mjs +0 -252
  40. package/dist/less-CzmjXREq.mjs +0 -162
  41. package/dist/lexon-CV2c4pN9.mjs +0 -157
  42. package/dist/liquid-CHAki8UD.mjs +0 -233
  43. package/dist/lspLanguageFeatures-B7Hqx8aW.mjs +0 -1458
  44. package/dist/lua-CFY5U8qF.mjs +0 -162
  45. package/dist/m3-BL_AnZVh.mjs +0 -210
  46. package/dist/markdown-CWKQPXCv.mjs +0 -229
  47. package/dist/mdx-zeC77g8c.mjs +0 -158
  48. package/dist/mips-ButYmJ5E.mjs +0 -198
  49. package/dist/monaco-editor11.css +0 -1
  50. package/dist/msdax-C3cnXqDh.mjs +0 -375
  51. package/dist/mysql-YlSHaf6G.mjs +0 -878
  52. package/dist/objective-c-Dwnlproe.mjs +0 -183
  53. package/dist/pascal-UzGbSWEN.mjs +0 -251
  54. package/dist/pascaligo-CslTgu68.mjs +0 -164
  55. package/dist/perl-oj6r_mgw.mjs +0 -626
  56. package/dist/pgsql-DSBO0Mev.mjs +0 -851
  57. package/dist/php-YzCD--7j.mjs +0 -500
  58. package/dist/pla-CmylB8vQ.mjs +0 -137
  59. package/dist/postiats-CLFW5gNY.mjs +0 -907
  60. package/dist/powerquery-CmOWUvlh.mjs +0 -890
  61. package/dist/powershell-fHQcmBLK.mjs +0 -239
  62. package/dist/protobuf-p5BArb-9.mjs +0 -420
  63. package/dist/pug-gVdUDvqf.mjs +0 -402
  64. package/dist/python-DULwfuw6.mjs +0 -294
  65. package/dist/qsharp-DnrWSUlt.mjs +0 -301
  66. package/dist/r-Cv309K2z.mjs +0 -243
  67. package/dist/razor-c0jgmA5G.mjs +0 -543
  68. package/dist/redis-DTcS4wMj.mjs +0 -302
  69. package/dist/redshift-hLxZVESM.mjs +0 -809
  70. package/dist/restructuredtext-C898lK4f.mjs +0 -174
  71. package/dist/ruby-CgKtnJIQ.mjs +0 -511
  72. package/dist/rust-bj8oxVnh.mjs +0 -343
  73. package/dist/sb-DWynz26l.mjs +0 -115
  74. package/dist/scala-BL5z1UEd.mjs +0 -370
  75. package/dist/scheme-DUJsH6VU.mjs +0 -108
  76. package/dist/scss-CxjmhvaL.mjs +0 -262
  77. package/dist/shell-D14Zs1dF.mjs +0 -221
  78. package/dist/solidity-WyRm-BGK.mjs +0 -1367
  79. package/dist/sophia-CKk-_Oa5.mjs +0 -199
  80. package/dist/sparql-DHtmINMZ.mjs +0 -201
  81. package/dist/sql-Dqaj5JHC.mjs +0 -853
  82. package/dist/st-Bj2IIaop.mjs +0 -416
  83. package/dist/swift-DwxP72iM.mjs +0 -312
  84. package/dist/systemverilog-D7wJfuql.mjs +0 -576
  85. package/dist/tcl-0ApMt-eC.mjs +0 -232
  86. package/dist/tsMode-CepBtZtU.mjs +0 -946
  87. package/dist/twig-DxwbdmvQ.mjs +0 -392
  88. package/dist/typescript-hbfpGuFj.mjs +0 -336
  89. package/dist/typespec-Fd-JwSuS.mjs +0 -117
  90. package/dist/vb-CxuyYE1I.mjs +0 -372
  91. package/dist/wgsl-DoEGc31J.mjs +0 -439
  92. package/dist/xml-DE69CcMx.mjs +0 -88
  93. package/dist/yaml-CdiGER8y.mjs +0 -199
@@ -1,907 +0,0 @@
1
- const e = {
2
- comments: {
3
- lineComment: "//",
4
- blockComment: ["(*", "*)"]
5
- },
6
- brackets: [
7
- ["{", "}"],
8
- ["[", "]"],
9
- ["(", ")"],
10
- ["<", ">"]
11
- ],
12
- autoClosingPairs: [
13
- { open: '"', close: '"', notIn: ["string", "comment"] },
14
- { open: "{", close: "}", notIn: ["string", "comment"] },
15
- { open: "[", close: "]", notIn: ["string", "comment"] },
16
- { open: "(", close: ")", notIn: ["string", "comment"] }
17
- ]
18
- }, t = {
19
- tokenPostfix: ".pats",
20
- // TODO: staload and dynload are followed by a special kind of string literals
21
- // with {$IDENTIFER} variables, and it also may make sense to highlight
22
- // the punctuation (. and / and \) differently.
23
- // Set defaultToken to invalid to see what you do not tokenize yet
24
- defaultToken: "invalid",
25
- // keyword reference: https://github.com/githwxi/ATS-Postiats/blob/master/src/pats_lexing_token.dats
26
- keywords: [
27
- //
28
- "abstype",
29
- // ABSTYPE
30
- "abst0ype",
31
- // ABST0YPE
32
- "absprop",
33
- // ABSPROP
34
- "absview",
35
- // ABSVIEW
36
- "absvtype",
37
- // ABSVIEWTYPE
38
- "absviewtype",
39
- // ABSVIEWTYPE
40
- "absvt0ype",
41
- // ABSVIEWT0YPE
42
- "absviewt0ype",
43
- // ABSVIEWT0YPE
44
- //
45
- "as",
46
- // T_AS
47
- //
48
- "and",
49
- // T_AND
50
- //
51
- "assume",
52
- // T_ASSUME
53
- //
54
- "begin",
55
- // T_BEGIN
56
- //
57
- /*
58
- "case", // CASE
59
- */
60
- //
61
- "classdec",
62
- // T_CLASSDEC
63
- //
64
- "datasort",
65
- // T_DATASORT
66
- //
67
- "datatype",
68
- // DATATYPE
69
- "dataprop",
70
- // DATAPROP
71
- "dataview",
72
- // DATAVIEW
73
- "datavtype",
74
- // DATAVIEWTYPE
75
- "dataviewtype",
76
- // DATAVIEWTYPE
77
- //
78
- "do",
79
- // T_DO
80
- //
81
- "end",
82
- // T_END
83
- //
84
- "extern",
85
- // T_EXTERN
86
- "extype",
87
- // T_EXTYPE
88
- "extvar",
89
- // T_EXTVAR
90
- //
91
- "exception",
92
- // T_EXCEPTION
93
- //
94
- "fn",
95
- // FN // non-recursive
96
- "fnx",
97
- // FNX // mutual tail-rec.
98
- "fun",
99
- // FUN // general-recursive
100
- //
101
- "prfn",
102
- // PRFN
103
- "prfun",
104
- // PRFUN
105
- //
106
- "praxi",
107
- // PRAXI
108
- "castfn",
109
- // CASTFN
110
- //
111
- "if",
112
- // T_IF
113
- "then",
114
- // T_THEN
115
- "else",
116
- // T_ELSE
117
- //
118
- "ifcase",
119
- // T_IFCASE
120
- //
121
- "in",
122
- // T_IN
123
- //
124
- "infix",
125
- // INFIX
126
- "infixl",
127
- // INFIXL
128
- "infixr",
129
- // INFIXR
130
- "prefix",
131
- // PREFIX
132
- "postfix",
133
- // POSTFIX
134
- //
135
- "implmnt",
136
- // IMPLMNT // 0
137
- "implement",
138
- // IMPLEMENT // 1
139
- //
140
- "primplmnt",
141
- // PRIMPLMNT // ~1
142
- "primplement",
143
- // PRIMPLMNT // ~1
144
- //
145
- "import",
146
- // T_IMPORT // for importing packages
147
- //
148
- /*
149
- "lam", // LAM
150
- "llam", // LLAM
151
- "fix", // FIX
152
- */
153
- //
154
- "let",
155
- // T_LET
156
- //
157
- "local",
158
- // T_LOCAL
159
- //
160
- "macdef",
161
- // MACDEF
162
- "macrodef",
163
- // MACRODEF
164
- //
165
- "nonfix",
166
- // T_NONFIX
167
- //
168
- "symelim",
169
- // T_SYMELIM
170
- "symintr",
171
- // T_SYMINTR
172
- "overload",
173
- // T_OVERLOAD
174
- //
175
- "of",
176
- // T_OF
177
- "op",
178
- // T_OP
179
- //
180
- "rec",
181
- // T_REC
182
- //
183
- "sif",
184
- // T_SIF
185
- "scase",
186
- // T_SCASE
187
- //
188
- "sortdef",
189
- // T_SORTDEF
190
- /*
191
- // HX: [sta] is now deprecated
192
- */
193
- "sta",
194
- // T_STACST
195
- "stacst",
196
- // T_STACST
197
- "stadef",
198
- // T_STADEF
199
- "static",
200
- // T_STATIC
201
- /*
202
- "stavar", // T_STAVAR
203
- */
204
- //
205
- "staload",
206
- // T_STALOAD
207
- "dynload",
208
- // T_DYNLOAD
209
- //
210
- "try",
211
- // T_TRY
212
- //
213
- "tkindef",
214
- // T_TKINDEF // HX-2012-05-23
215
- //
216
- /*
217
- "type", // TYPE
218
- */
219
- "typedef",
220
- // TYPEDEF
221
- "propdef",
222
- // PROPDEF
223
- "viewdef",
224
- // VIEWDEF
225
- "vtypedef",
226
- // VIEWTYPEDEF
227
- "viewtypedef",
228
- // VIEWTYPEDEF
229
- //
230
- /*
231
- "val", // VAL
232
- */
233
- "prval",
234
- // PRVAL
235
- //
236
- "var",
237
- // VAR
238
- "prvar",
239
- // PRVAR
240
- //
241
- "when",
242
- // T_WHEN
243
- "where",
244
- // T_WHERE
245
- //
246
- /*
247
- "for", // T_FOR
248
- "while", // T_WHILE
249
- */
250
- //
251
- "with",
252
- // T_WITH
253
- //
254
- "withtype",
255
- // WITHTYPE
256
- "withprop",
257
- // WITHPROP
258
- "withview",
259
- // WITHVIEW
260
- "withvtype",
261
- // WITHVIEWTYPE
262
- "withviewtype"
263
- // WITHVIEWTYPE
264
- //
265
- ],
266
- keywords_dlr: [
267
- "$delay",
268
- // DLRDELAY
269
- "$ldelay",
270
- // DLRLDELAY
271
- //
272
- "$arrpsz",
273
- // T_DLRARRPSZ
274
- "$arrptrsize",
275
- // T_DLRARRPSZ
276
- //
277
- "$d2ctype",
278
- // T_DLRD2CTYPE
279
- //
280
- "$effmask",
281
- // DLREFFMASK
282
- "$effmask_ntm",
283
- // DLREFFMASK_NTM
284
- "$effmask_exn",
285
- // DLREFFMASK_EXN
286
- "$effmask_ref",
287
- // DLREFFMASK_REF
288
- "$effmask_wrt",
289
- // DLREFFMASK_WRT
290
- "$effmask_all",
291
- // DLREFFMASK_ALL
292
- //
293
- "$extern",
294
- // T_DLREXTERN
295
- "$extkind",
296
- // T_DLREXTKIND
297
- "$extype",
298
- // T_DLREXTYPE
299
- "$extype_struct",
300
- // T_DLREXTYPE_STRUCT
301
- //
302
- "$extval",
303
- // T_DLREXTVAL
304
- "$extfcall",
305
- // T_DLREXTFCALL
306
- "$extmcall",
307
- // T_DLREXTMCALL
308
- //
309
- "$literal",
310
- // T_DLRLITERAL
311
- //
312
- "$myfilename",
313
- // T_DLRMYFILENAME
314
- "$mylocation",
315
- // T_DLRMYLOCATION
316
- "$myfunction",
317
- // T_DLRMYFUNCTION
318
- //
319
- "$lst",
320
- // DLRLST
321
- "$lst_t",
322
- // DLRLST_T
323
- "$lst_vt",
324
- // DLRLST_VT
325
- "$list",
326
- // DLRLST
327
- "$list_t",
328
- // DLRLST_T
329
- "$list_vt",
330
- // DLRLST_VT
331
- //
332
- "$rec",
333
- // DLRREC
334
- "$rec_t",
335
- // DLRREC_T
336
- "$rec_vt",
337
- // DLRREC_VT
338
- "$record",
339
- // DLRREC
340
- "$record_t",
341
- // DLRREC_T
342
- "$record_vt",
343
- // DLRREC_VT
344
- //
345
- "$tup",
346
- // DLRTUP
347
- "$tup_t",
348
- // DLRTUP_T
349
- "$tup_vt",
350
- // DLRTUP_VT
351
- "$tuple",
352
- // DLRTUP
353
- "$tuple_t",
354
- // DLRTUP_T
355
- "$tuple_vt",
356
- // DLRTUP_VT
357
- //
358
- "$break",
359
- // T_DLRBREAK
360
- "$continue",
361
- // T_DLRCONTINUE
362
- //
363
- "$raise",
364
- // T_DLRRAISE
365
- //
366
- "$showtype",
367
- // T_DLRSHOWTYPE
368
- //
369
- "$vcopyenv_v",
370
- // DLRVCOPYENV_V
371
- "$vcopyenv_vt",
372
- // DLRVCOPYENV_VT
373
- //
374
- "$tempenver",
375
- // T_DLRTEMPENVER
376
- //
377
- "$solver_assert",
378
- // T_DLRSOLASSERT
379
- "$solver_verify"
380
- // T_DLRSOLVERIFY
381
- ],
382
- keywords_srp: [
383
- //
384
- "#if",
385
- // T_SRPIF
386
- "#ifdef",
387
- // T_SRPIFDEF
388
- "#ifndef",
389
- // T_SRPIFNDEF
390
- //
391
- "#then",
392
- // T_SRPTHEN
393
- //
394
- "#elif",
395
- // T_SRPELIF
396
- "#elifdef",
397
- // T_SRPELIFDEF
398
- "#elifndef",
399
- // T_SRPELIFNDEF
400
- //
401
- "#else",
402
- // T_SRPELSE
403
- "#endif",
404
- // T_SRPENDIF
405
- //
406
- "#error",
407
- // T_SRPERROR
408
- //
409
- "#prerr",
410
- // T_SRPPRERR // outpui to stderr
411
- "#print",
412
- // T_SRPPRINT // output to stdout
413
- //
414
- "#assert",
415
- // T_SRPASSERT
416
- //
417
- "#undef",
418
- // T_SRPUNDEF
419
- "#define",
420
- // T_SRPDEFINE
421
- //
422
- "#include",
423
- // T_SRPINCLUDE
424
- "#require",
425
- // T_SRPREQUIRE
426
- //
427
- "#pragma",
428
- // T_SRPPRAGMA // HX: general pragma
429
- "#codegen2",
430
- // T_SRPCODEGEN2 // for level-2 codegen
431
- "#codegen3"
432
- // T_SRPCODEGEN3 // for level-3 codegen
433
- //
434
- // HX: end of special tokens
435
- //
436
- ],
437
- irregular_keyword_list: [
438
- "val+",
439
- "val-",
440
- "val",
441
- "case+",
442
- "case-",
443
- "case",
444
- "addr@",
445
- "addr",
446
- "fold@",
447
- "free@",
448
- "fix@",
449
- "fix",
450
- "lam@",
451
- "lam",
452
- "llam@",
453
- "llam",
454
- "viewt@ype+",
455
- "viewt@ype-",
456
- "viewt@ype",
457
- "viewtype+",
458
- "viewtype-",
459
- "viewtype",
460
- "view+",
461
- "view-",
462
- "view@",
463
- "view",
464
- "type+",
465
- "type-",
466
- "type",
467
- "vtype+",
468
- "vtype-",
469
- "vtype",
470
- "vt@ype+",
471
- "vt@ype-",
472
- "vt@ype",
473
- "viewt@ype+",
474
- "viewt@ype-",
475
- "viewt@ype",
476
- "viewtype+",
477
- "viewtype-",
478
- "viewtype",
479
- "prop+",
480
- "prop-",
481
- "prop",
482
- "type+",
483
- "type-",
484
- "type",
485
- "t@ype",
486
- "t@ype+",
487
- "t@ype-",
488
- "abst@ype",
489
- "abstype",
490
- "absviewt@ype",
491
- "absvt@ype",
492
- "for*",
493
- "for",
494
- "while*",
495
- "while"
496
- ],
497
- keywords_types: [
498
- "bool",
499
- "double",
500
- "byte",
501
- "int",
502
- "short",
503
- "char",
504
- "void",
505
- "unit",
506
- "long",
507
- "float",
508
- "string",
509
- "strptr"
510
- ],
511
- // TODO: reference for this?
512
- keywords_effects: [
513
- "0",
514
- // no effects
515
- "fun",
516
- "clo",
517
- "prf",
518
- "funclo",
519
- "cloptr",
520
- "cloref",
521
- "ref",
522
- "ntm",
523
- "1"
524
- // all effects
525
- ],
526
- operators: [
527
- "@",
528
- // T_AT
529
- "!",
530
- // T_BANG
531
- "|",
532
- // T_BAR
533
- "`",
534
- // T_BQUOTE
535
- ":",
536
- // T_COLON
537
- "$",
538
- // T_DOLLAR
539
- ".",
540
- // T_DOT
541
- "=",
542
- // T_EQ
543
- "#",
544
- // T_HASH
545
- "~",
546
- // T_TILDE
547
- //
548
- "..",
549
- // T_DOTDOT
550
- "...",
551
- // T_DOTDOTDOT
552
- //
553
- "=>",
554
- // T_EQGT
555
- // "=<", // T_EQLT
556
- "=<>",
557
- // T_EQLTGT
558
- "=/=>",
559
- // T_EQSLASHEQGT
560
- "=>>",
561
- // T_EQGTGT
562
- "=/=>>",
563
- // T_EQSLASHEQGTGT
564
- //
565
- "<",
566
- // T_LT // opening a tmparg
567
- ">",
568
- // T_GT // closing a tmparg
569
- //
570
- "><",
571
- // T_GTLT
572
- //
573
- ".<",
574
- // T_DOTLT
575
- ">.",
576
- // T_GTDOT
577
- //
578
- ".<>.",
579
- // T_DOTLTGTDOT
580
- //
581
- "->",
582
- // T_MINUSGT
583
- //"-<", // T_MINUSLT
584
- "-<>"
585
- // T_MINUSLTGT
586
- //
587
- /*
588
- ":<", // T_COLONLT
589
- */
590
- ],
591
- brackets: [
592
- { open: ",(", close: ")", token: "delimiter.parenthesis" },
593
- // meta-programming syntax
594
- { open: "`(", close: ")", token: "delimiter.parenthesis" },
595
- { open: "%(", close: ")", token: "delimiter.parenthesis" },
596
- { open: "'(", close: ")", token: "delimiter.parenthesis" },
597
- { open: "'{", close: "}", token: "delimiter.parenthesis" },
598
- { open: "@(", close: ")", token: "delimiter.parenthesis" },
599
- { open: "@{", close: "}", token: "delimiter.brace" },
600
- { open: "@[", close: "]", token: "delimiter.square" },
601
- { open: "#[", close: "]", token: "delimiter.square" },
602
- { open: "{", close: "}", token: "delimiter.curly" },
603
- { open: "[", close: "]", token: "delimiter.square" },
604
- { open: "(", close: ")", token: "delimiter.parenthesis" },
605
- { open: "<", close: ">", token: "delimiter.angle" }
606
- ],
607
- // we include these common regular expressions
608
- symbols: /[=><!~?:&|+\-*\/\^%]+/,
609
- IDENTFST: /[a-zA-Z_]/,
610
- IDENTRST: /[a-zA-Z0-9_'$]/,
611
- symbolic: /[%&+-./:=@~`^|*!$#?<>]/,
612
- digit: /[0-9]/,
613
- digitseq0: /@digit*/,
614
- xdigit: /[0-9A-Za-z]/,
615
- xdigitseq0: /@xdigit*/,
616
- INTSP: /[lLuU]/,
617
- FLOATSP: /[fFlL]/,
618
- fexponent: /[eE][+-]?[0-9]+/,
619
- fexponent_bin: /[pP][+-]?[0-9]+/,
620
- deciexp: /\.[0-9]*@fexponent?/,
621
- hexiexp: /\.[0-9a-zA-Z]*@fexponent_bin?/,
622
- irregular_keywords: /val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,
623
- ESCHAR: /[ntvbrfa\\\?'"\(\[\{]/,
624
- start: "root",
625
- // The main tokenizer for ATS/Postiats
626
- // reference: https://github.com/githwxi/ATS-Postiats/blob/master/src/pats_lexing.dats
627
- tokenizer: {
628
- root: [
629
- // lexing_blankseq0
630
- { regex: /[ \t\r\n]+/, action: { token: "" } },
631
- // NOTE: (*) is an invalid ML-like comment!
632
- { regex: /\(\*\)/, action: { token: "invalid" } },
633
- {
634
- regex: /\(\*/,
635
- action: { token: "comment", next: "lexing_COMMENT_block_ml" }
636
- },
637
- {
638
- regex: /\(/,
639
- action: "@brackets"
640
- /*{ token: 'delimiter.parenthesis' }*/
641
- },
642
- {
643
- regex: /\)/,
644
- action: "@brackets"
645
- /*{ token: 'delimiter.parenthesis' }*/
646
- },
647
- {
648
- regex: /\[/,
649
- action: "@brackets"
650
- /*{ token: 'delimiter.bracket' }*/
651
- },
652
- {
653
- regex: /\]/,
654
- action: "@brackets"
655
- /*{ token: 'delimiter.bracket' }*/
656
- },
657
- {
658
- regex: /\{/,
659
- action: "@brackets"
660
- /*{ token: 'delimiter.brace' }*/
661
- },
662
- {
663
- regex: /\}/,
664
- action: "@brackets"
665
- /*{ token: 'delimiter.brace' }*/
666
- },
667
- // lexing_COMMA
668
- {
669
- regex: /,\(/,
670
- action: "@brackets"
671
- /*{ token: 'delimiter.parenthesis' }*/
672
- },
673
- // meta-programming syntax
674
- { regex: /,/, action: { token: "delimiter.comma" } },
675
- { regex: /;/, action: { token: "delimiter.semicolon" } },
676
- // lexing_AT
677
- {
678
- regex: /@\(/,
679
- action: "@brackets"
680
- /* { token: 'delimiter.parenthesis' }*/
681
- },
682
- {
683
- regex: /@\[/,
684
- action: "@brackets"
685
- /* { token: 'delimiter.bracket' }*/
686
- },
687
- {
688
- regex: /@\{/,
689
- action: "@brackets"
690
- /*{ token: 'delimiter.brace' }*/
691
- },
692
- // lexing_COLON
693
- {
694
- regex: /:</,
695
- action: { token: "keyword", next: "@lexing_EFFECT_commaseq0" }
696
- },
697
- // T_COLONLT
698
- /*
699
- lexing_DOT:
700
-
701
- . // SYMBOLIC => lexing_IDENT_sym
702
- . FLOATDOT => lexing_FLOAT_deciexp
703
- . DIGIT => T_DOTINT
704
- */
705
- { regex: /\.@symbolic+/, action: { token: "identifier.sym" } },
706
- // FLOATDOT case
707
- {
708
- regex: /\.@digit*@fexponent@FLOATSP*/,
709
- action: { token: "number.float" }
710
- },
711
- { regex: /\.@digit+/, action: { token: "number.float" } },
712
- // T_DOTINT
713
- // lexing_DOLLAR:
714
- // '$' IDENTFST IDENTRST* => lexing_IDENT_dlr, _ => lexing_IDENT_sym
715
- {
716
- regex: /\$@IDENTFST@IDENTRST*/,
717
- action: {
718
- cases: {
719
- "@keywords_dlr": { token: "keyword.dlr" },
720
- "@default": { token: "namespace" }
721
- // most likely a module qualifier
722
- }
723
- }
724
- },
725
- // lexing_SHARP:
726
- // '#' IDENTFST IDENTRST* => lexing_ident_srp, _ => lexing_IDENT_sym
727
- {
728
- regex: /\#@IDENTFST@IDENTRST*/,
729
- action: {
730
- cases: {
731
- "@keywords_srp": { token: "keyword.srp" },
732
- "@default": { token: "identifier" }
733
- }
734
- }
735
- },
736
- // lexing_PERCENT:
737
- { regex: /%\(/, action: { token: "delimiter.parenthesis" } },
738
- {
739
- regex: /^%{(#|\^|\$)?/,
740
- action: {
741
- token: "keyword",
742
- next: "@lexing_EXTCODE",
743
- nextEmbedded: "text/javascript"
744
- }
745
- },
746
- { regex: /^%}/, action: { token: "keyword" } },
747
- // lexing_QUOTE
748
- { regex: /'\(/, action: { token: "delimiter.parenthesis" } },
749
- { regex: /'\[/, action: { token: "delimiter.bracket" } },
750
- { regex: /'\{/, action: { token: "delimiter.brace" } },
751
- [/(')(\\@ESCHAR|\\[xX]@xdigit+|\\@digit+)(')/, ["string", "string.escape", "string"]],
752
- [/'[^\\']'/, "string"],
753
- // lexing_DQUOTE
754
- [/"/, "string.quote", "@lexing_DQUOTE"],
755
- // lexing_BQUOTE
756
- {
757
- regex: /`\(/,
758
- action: "@brackets"
759
- /* { token: 'delimiter.parenthesis' }*/
760
- },
761
- // TODO: otherwise, try lexing_IDENT_sym
762
- { regex: /\\/, action: { token: "punctuation" } },
763
- // just T_BACKSLASH
764
- // lexing_IDENT_alp:
765
- // NOTE: (?!regex) is syntax for "not-followed-by" regex
766
- // to resolve ambiguity such as foreach$fwork being incorrectly lexed as [for] [each$fwork]!
767
- {
768
- regex: /@irregular_keywords(?!@IDENTRST)/,
769
- action: { token: "keyword" }
770
- },
771
- {
772
- regex: /@IDENTFST@IDENTRST*[<!\[]?/,
773
- action: {
774
- cases: {
775
- // TODO: dynload and staload should be specially parsed
776
- // dynload whitespace+ "special_string"
777
- // this special string is really:
778
- // '/' '\\' '.' => punctuation
779
- // ({\$)([a-zA-Z_][a-zA-Z_0-9]*)(}) => punctuation,keyword,punctuation
780
- // [^"] => identifier/literal
781
- "@keywords": { token: "keyword" },
782
- "@keywords_types": { token: "type" },
783
- "@default": { token: "identifier" }
784
- }
785
- }
786
- },
787
- // lexing_IDENT_sym:
788
- {
789
- regex: /\/\/\/\//,
790
- action: { token: "comment", next: "@lexing_COMMENT_rest" }
791
- },
792
- { regex: /\/\/.*$/, action: { token: "comment" } },
793
- {
794
- regex: /\/\*/,
795
- action: { token: "comment", next: "@lexing_COMMENT_block_c" }
796
- },
797
- // AS-20160627: specifically for effect annotations
798
- {
799
- regex: /-<|=</,
800
- action: { token: "keyword", next: "@lexing_EFFECT_commaseq0" }
801
- },
802
- {
803
- regex: /@symbolic+/,
804
- action: {
805
- cases: {
806
- "@operators": "keyword",
807
- "@default": "operator"
808
- }
809
- }
810
- },
811
- // lexing_ZERO:
812
- // FIXME: this one is quite messy/unfinished yet
813
- // TODO: lexing_INT_hex
814
- // - testing_hexiexp => lexing_FLOAT_hexiexp
815
- // - testing_fexponent_bin => lexing_FLOAT_hexiexp
816
- // - testing_intspseq0 => T_INT_hex
817
- // lexing_INT_hex:
818
- {
819
- regex: /0[xX]@xdigit+(@hexiexp|@fexponent_bin)@FLOATSP*/,
820
- action: { token: "number.float" }
821
- },
822
- { regex: /0[xX]@xdigit+@INTSP*/, action: { token: "number.hex" } },
823
- {
824
- regex: /0[0-7]+(?![0-9])@INTSP*/,
825
- action: { token: "number.octal" }
826
- },
827
- // lexing_INT_oct
828
- //{regex: /0/, action: { token: 'number' } }, // INTZERO
829
- // lexing_INT_dec:
830
- // - testing_deciexp => lexing_FLOAT_deciexp
831
- // - testing_fexponent => lexing_FLOAT_deciexp
832
- // - otherwise => intspseq0 ([0-9]*[lLuU]?)
833
- {
834
- regex: /@digit+(@fexponent|@deciexp)@FLOATSP*/,
835
- action: { token: "number.float" }
836
- },
837
- {
838
- regex: /@digit@digitseq0@INTSP*/,
839
- action: { token: "number.decimal" }
840
- },
841
- // DIGIT, if followed by digitseq0, is lexing_INT_dec
842
- { regex: /@digit+@INTSP*/, action: { token: "number" } }
843
- ],
844
- lexing_COMMENT_block_ml: [
845
- [/[^\(\*]+/, "comment"],
846
- [/\(\*/, "comment", "@push"],
847
- [/\(\*/, "comment.invalid"],
848
- [/\*\)/, "comment", "@pop"],
849
- [/\*/, "comment"]
850
- ],
851
- lexing_COMMENT_block_c: [
852
- [/[^\/*]+/, "comment"],
853
- // [/\/\*/, 'comment', '@push' ], // nested C-style block comments not allowed
854
- // [/\/\*/, 'comment.invalid' ], // NOTE: this breaks block comments in the shape of /* //*/
855
- [/\*\//, "comment", "@pop"],
856
- [/[\/*]/, "comment"]
857
- ],
858
- lexing_COMMENT_rest: [
859
- [/$/, "comment", "@pop"],
860
- // FIXME: does it match? docs say 'no'
861
- [/.*/, "comment"]
862
- ],
863
- // NOTE: added by AS, specifically for highlighting
864
- lexing_EFFECT_commaseq0: [
865
- {
866
- regex: /@IDENTFST@IDENTRST+|@digit+/,
867
- action: {
868
- cases: {
869
- "@keywords_effects": { token: "type.effect" },
870
- "@default": { token: "identifier" }
871
- }
872
- }
873
- },
874
- { regex: /,/, action: { token: "punctuation" } },
875
- { regex: />/, action: { token: "@rematch", next: "@pop" } }
876
- ],
877
- lexing_EXTCODE: [
878
- {
879
- regex: /^%}/,
880
- action: {
881
- token: "@rematch",
882
- next: "@pop",
883
- nextEmbedded: "@pop"
884
- }
885
- },
886
- { regex: /[^%]+/, action: "" }
887
- ],
888
- lexing_DQUOTE: [
889
- { regex: /"/, action: { token: "string.quote", next: "@pop" } },
890
- // AS-20160628: additional hi-lighting for variables in staload/dynload strings
891
- {
892
- regex: /(\{\$)(@IDENTFST@IDENTRST*)(\})/,
893
- action: [{ token: "string.escape" }, { token: "identifier" }, { token: "string.escape" }]
894
- },
895
- { regex: /\\$/, action: { token: "string.escape" } },
896
- {
897
- regex: /\\(@ESCHAR|[xX]@xdigit+|@digit+)/,
898
- action: { token: "string.escape" }
899
- },
900
- { regex: /[^\\"]+/, action: { token: "string" } }
901
- ]
902
- }
903
- };
904
- export {
905
- e as conf,
906
- t as language
907
- };