svelte-highlight 7.19.0 → 7.20.1

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.
package/languages/all.js CHANGED
@@ -3,6 +3,7 @@ import abnf from "./abnf.js";
3
3
  import accesslog from "./accesslog.js";
4
4
  import actionscript from "./actionscript.js";
5
5
  import ada from "./ada.js";
6
+ import agda from "./agda.js";
6
7
  import angelscript from "./angelscript.js";
7
8
  import angular from "./angular.js";
8
9
  import apache from "./apache.js";
@@ -32,6 +33,7 @@ import cairo from "./cairo.js";
32
33
  import cal from "./cal.js";
33
34
  import capnproto from "./capnproto.js";
34
35
  import cedar from "./cedar.js";
36
+ import cel from "./cel.js";
35
37
  import ceylon from "./ceylon.js";
36
38
  import clarity from "./clarity.js";
37
39
  import clean from "./clean.js";
@@ -53,6 +55,7 @@ import cypher from "./cypher.js";
53
55
  import d from "./d.js";
54
56
  import d2 from "./d2.js";
55
57
  import dart from "./dart.js";
58
+ import datalog from "./datalog.js";
56
59
  import dax from "./dax.js";
57
60
  import delphi from "./delphi.js";
58
61
  import dhall from "./dhall.js";
@@ -74,6 +77,7 @@ import erlang from "./erlang.js";
74
77
  import erlangRepl from "./erlang-repl.js";
75
78
  import esql from "./esql.js";
76
79
  import excel from "./excel.js";
80
+ import fennel from "./fennel.js";
77
81
  import fish from "./fish.js";
78
82
  import fix from "./fix.js";
79
83
  import flix from "./flix.js";
@@ -107,6 +111,7 @@ import html from "./html.js";
107
111
  import http from "./http.js";
108
112
  import hurl from "./hurl.js";
109
113
  import hy from "./hy.js";
114
+ import idris from "./idris.js";
110
115
  import inform7 from "./inform7.js";
111
116
  import ini from "./ini.js";
112
117
  import irpf90 from "./irpf90.js";
@@ -115,9 +120,11 @@ import java from "./java.js";
115
120
  import javascript from "./javascript.js";
116
121
  import jbossCli from "./jboss-cli.js";
117
122
  import jinja from "./jinja.js";
123
+ import jmespath from "./jmespath.js";
118
124
  import jq from "./jq.js";
119
125
  import json from "./json.js";
120
126
  import json5 from "./json5.js";
127
+ import jsonata from "./jsonata.js";
121
128
  import jsonc from "./jsonc.js";
122
129
  import jsonnet from "./jsonnet.js";
123
130
  import julia from "./julia.js";
@@ -130,6 +137,7 @@ import lasso from "./lasso.js";
130
137
  import latex from "./latex.js";
131
138
  import ldif from "./ldif.js";
132
139
  import leaf from "./leaf.js";
140
+ import lean from "./lean.js";
133
141
  import less from "./less.js";
134
142
  import liquid from "./liquid.js";
135
143
  import lisp from "./lisp.js";
@@ -193,11 +201,13 @@ import prql from "./prql.js";
193
201
  import pug from "./pug.js";
194
202
  import puppet from "./puppet.js";
195
203
  import purebasic from "./purebasic.js";
204
+ import purescript from "./purescript.js";
196
205
  import python from "./python.js";
197
206
  import pythonRepl from "./python-repl.js";
198
207
  import q from "./q.js";
199
208
  import qml from "./qml.js";
200
209
  import r from "./r.js";
210
+ import racket from "./racket.js";
201
211
  import razor from "./razor.js";
202
212
  import reasonml from "./reasonml.js";
203
213
  import rego from "./rego.js";
@@ -221,6 +231,7 @@ import smalltalk from "./smalltalk.js";
221
231
  import sml from "./sml.js";
222
232
  import solidity from "./solidity.js";
223
233
  import sparql from "./sparql.js";
234
+ import splunk from "./splunk.js";
224
235
  import sqf from "./sqf.js";
225
236
  import sql from "./sql.js";
226
237
  import stan from "./stan.js";
@@ -252,6 +263,7 @@ import vbscriptHtml from "./vbscript-html.js";
252
263
  import verilog from "./verilog.js";
253
264
  import vhdl from "./vhdl.js";
254
265
  import vim from "./vim.js";
266
+ import vrl from "./vrl.js";
255
267
  import vue from "./vue.js";
256
268
  import vyper from "./vyper.js";
257
269
  import wasm from "./wasm.js";
@@ -272,6 +284,7 @@ export default [
272
284
  accesslog,
273
285
  actionscript,
274
286
  ada,
287
+ agda,
275
288
  angelscript,
276
289
  angular,
277
290
  apache,
@@ -301,6 +314,7 @@ export default [
301
314
  cal,
302
315
  capnproto,
303
316
  cedar,
317
+ cel,
304
318
  ceylon,
305
319
  clarity,
306
320
  clean,
@@ -322,6 +336,7 @@ export default [
322
336
  d,
323
337
  d2,
324
338
  dart,
339
+ datalog,
325
340
  dax,
326
341
  delphi,
327
342
  dhall,
@@ -343,6 +358,7 @@ export default [
343
358
  erlangRepl,
344
359
  esql,
345
360
  excel,
361
+ fennel,
346
362
  fish,
347
363
  fix,
348
364
  flix,
@@ -376,6 +392,7 @@ export default [
376
392
  http,
377
393
  hurl,
378
394
  hy,
395
+ idris,
379
396
  inform7,
380
397
  ini,
381
398
  irpf90,
@@ -384,9 +401,11 @@ export default [
384
401
  javascript,
385
402
  jbossCli,
386
403
  jinja,
404
+ jmespath,
387
405
  jq,
388
406
  json,
389
407
  json5,
408
+ jsonata,
390
409
  jsonc,
391
410
  jsonnet,
392
411
  julia,
@@ -399,6 +418,7 @@ export default [
399
418
  latex,
400
419
  ldif,
401
420
  leaf,
421
+ lean,
402
422
  less,
403
423
  liquid,
404
424
  lisp,
@@ -462,11 +482,13 @@ export default [
462
482
  pug,
463
483
  puppet,
464
484
  purebasic,
485
+ purescript,
465
486
  python,
466
487
  pythonRepl,
467
488
  q,
468
489
  qml,
469
490
  r,
491
+ racket,
470
492
  razor,
471
493
  reasonml,
472
494
  rego,
@@ -490,6 +512,7 @@ export default [
490
512
  sml,
491
513
  solidity,
492
514
  sparql,
515
+ splunk,
493
516
  sqf,
494
517
  sql,
495
518
  stan,
@@ -521,6 +544,7 @@ export default [
521
544
  verilog,
522
545
  vhdl,
523
546
  vim,
547
+ vrl,
524
548
  vue,
525
549
  vyper,
526
550
  wasm,
@@ -0,0 +1,2 @@
1
+ export { cel } from "./";
2
+ export { cel as default } from "./";
@@ -0,0 +1,103 @@
1
+ export const cel = /** @type {import("./index.d.ts").LanguageType<"cel">} */ ({
2
+ name: "cel",
3
+ aliases: ["cel"],
4
+ register: {
5
+ name: "cel",
6
+ caseInsensitive: false,
7
+ unicode: false,
8
+ disableAutodetect: false,
9
+ states: [
10
+ {
11
+ rules: [1, 4, 5, 6, 8, 10, 12, 14, 15, 17, 16],
12
+ keywords: {
13
+ in: ["keyword", 0],
14
+ true: ["literal", 1],
15
+ false: ["literal", 1],
16
+ null: ["literal", 1],
17
+ size: ["built_in", 1],
18
+ type: ["built_in", 1],
19
+ matches: ["built_in", 1],
20
+ contains: ["built_in", 1],
21
+ startsWith: ["built_in", 1],
22
+ endsWith: ["built_in", 1],
23
+ timestamp: ["built_in", 1],
24
+ duration: ["built_in", 1],
25
+ dyn: ["built_in", 1],
26
+ bytes: ["built_in", 1],
27
+ int: ["built_in", 1],
28
+ uint: ["built_in", 1],
29
+ double: ["built_in", 1],
30
+ bool: ["built_in", 1],
31
+ string: ["built_in", 1],
32
+ getDate: ["built_in", 1],
33
+ getDayOfMonth: ["built_in", 1],
34
+ getDayOfWeek: ["built_in", 1],
35
+ getDayOfYear: ["built_in", 1],
36
+ getFullYear: ["built_in", 1],
37
+ getHours: ["built_in", 1],
38
+ getMilliseconds: ["built_in", 1],
39
+ getMinutes: ["built_in", 1],
40
+ getMonth: ["built_in", 1],
41
+ getSeconds: ["built_in", 1],
42
+ },
43
+ keywordPattern: "\\w+",
44
+ },
45
+ { rules: [2, 3], scope: "comment", begin: "//", end: "$" },
46
+ {
47
+ relevance: 0,
48
+ rules: [],
49
+ scope: "doctag",
50
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
51
+ end: "(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
52
+ excludeBegin: true,
53
+ },
54
+ {
55
+ rules: [],
56
+ begin:
57
+ "[ ]+((?:I|a|is|so|us|to|at|if|in|it|on|[A-Za-z]+['](d|ve|re|ll|t|s|n)|[A-Za-z]+[-][a-z]+|[A-Za-z][a-z]{2,})[.]?[:]?([.][ ]|[ ])){3}",
58
+ end: "\\B|\\b",
59
+ },
60
+ { rules: [], scope: "string", begin: 'r?"""', end: '"""' },
61
+ { rules: [], scope: "string", begin: "r?'''", end: "'''" },
62
+ { rules: [7], scope: "string", begin: 'r?"', end: '"' },
63
+ { relevance: 0, rules: [], begin: "\\\\[\\s\\S]", end: "\\B|\\b" },
64
+ { rules: [9], scope: "string", begin: "r?'", end: "'" },
65
+ { relevance: 0, rules: [], begin: "\\\\[\\s\\S]", end: "\\B|\\b" },
66
+ { rules: [11], scope: "string", begin: 'b"', end: '"' },
67
+ { relevance: 0, rules: [], begin: "\\\\[\\s\\S]", end: "\\B|\\b" },
68
+ { rules: [13], scope: "string", begin: "b'", end: "'" },
69
+ { relevance: 0, rules: [], begin: "\\\\[\\s\\S]", end: "\\B|\\b" },
70
+ {
71
+ relevance: 0,
72
+ rules: [],
73
+ scope: "built_in",
74
+ begin: "\\b(?:has|all|exists_one|exists|filter|map)(?=\\()",
75
+ end: "\\B|\\b",
76
+ },
77
+ {
78
+ relevance: 0,
79
+ rules: [4, 5, 6, 8, 10, 12, 16],
80
+ scope: "property",
81
+ begin: "\\[",
82
+ end: "\\]",
83
+ },
84
+ {
85
+ relevance: 0,
86
+ rules: [],
87
+ scope: "number",
88
+ begin:
89
+ "\\b0x[0-9a-fA-F]+[uU]?\\b|\\b\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[uU]?\\b",
90
+ end: "\\B|\\b",
91
+ },
92
+ {
93
+ relevance: 0,
94
+ rules: [],
95
+ scope: "property",
96
+ begin: "\\.[a-zA-Z_]\\w*",
97
+ end: "\\B|\\b",
98
+ },
99
+ ],
100
+ aliases: ["cel"],
101
+ },
102
+ });
103
+ export default cel;
@@ -0,0 +1,2 @@
1
+ export { datalog } from "./";
2
+ export { datalog as default } from "./";
@@ -0,0 +1,97 @@
1
+ export const datalog =
2
+ /** @type {import("./index.d.ts").LanguageType<"datalog">} */ ({
3
+ name: "datalog",
4
+ aliases: ["datalog", "dl"],
5
+ register: {
6
+ name: "datalog",
7
+ caseInsensitive: false,
8
+ unicode: false,
9
+ disableAutodetect: false,
10
+ states: [
11
+ { rules: [1, 4, 7, 8, 9, 10, 11, 13, 14, 15] },
12
+ { rules: [2, 3], scope: "comment", begin: "//", end: "$" },
13
+ {
14
+ relevance: 0,
15
+ rules: [],
16
+ scope: "doctag",
17
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
18
+ end: "(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
19
+ excludeBegin: true,
20
+ },
21
+ {
22
+ rules: [],
23
+ begin:
24
+ "[ ]+((?:I|a|is|so|us|to|at|if|in|it|on|[A-Za-z]+['](d|ve|re|ll|t|s|n)|[A-Za-z]+[-][a-z]+|[A-Za-z][a-z]{2,})[.]?[:]?([.][ ]|[ ])){3}",
25
+ end: "\\B|\\b",
26
+ },
27
+ { rules: [5, 6], scope: "comment", begin: "/\\*", end: "\\*/" },
28
+ {
29
+ relevance: 0,
30
+ rules: [],
31
+ scope: "doctag",
32
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
33
+ end: "(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
34
+ excludeBegin: true,
35
+ },
36
+ {
37
+ rules: [],
38
+ begin:
39
+ "[ ]+((?:I|a|is|so|us|to|at|if|in|it|on|[A-Za-z]+['](d|ve|re|ll|t|s|n)|[A-Za-z]+[-][a-z]+|[A-Za-z][a-z]{2,})[.]?[:]?([.][ ]|[ ])){3}",
40
+ end: "\\B|\\b",
41
+ },
42
+ {
43
+ relevance: 10,
44
+ rules: [],
45
+ scope: "meta",
46
+ begin: "^\\s*\\.[a-z_]+\\b",
47
+ end: "\\B|\\b",
48
+ },
49
+ {
50
+ relevance: 10,
51
+ rules: [],
52
+ scope: "operator",
53
+ begin: ":-",
54
+ end: "\\B|\\b",
55
+ },
56
+ {
57
+ relevance: 10,
58
+ rules: [],
59
+ scope: "operator",
60
+ begin: "\\?-",
61
+ end: "\\B|\\b",
62
+ },
63
+ {
64
+ relevance: 0,
65
+ rules: [],
66
+ scope: "keyword",
67
+ begin: "!|\\bnot\\b",
68
+ end: "\\B|\\b",
69
+ },
70
+ { rules: [12], scope: "string", begin: '"', end: '"' },
71
+ { relevance: 0, rules: [], begin: "\\\\[\\s\\S]", end: "\\B|\\b" },
72
+ {
73
+ relevance: 0,
74
+ rules: [],
75
+ scope: "title.function",
76
+ begin: "\\b[a-z][A-Za-z0-9_]*(?=\\()",
77
+ end: "\\B|\\b",
78
+ },
79
+ {
80
+ relevance: 0,
81
+ rules: [],
82
+ scope: "variable",
83
+ begin: "\\b[A-Z][A-Za-z0-9_]*\\b",
84
+ end: "\\B|\\b",
85
+ },
86
+ {
87
+ relevance: 0,
88
+ rules: [],
89
+ scope: "number",
90
+ begin: "\\b\\d+(?:\\.\\d+)?\\b",
91
+ end: "\\B|\\b",
92
+ },
93
+ ],
94
+ aliases: ["datalog", "dl"],
95
+ },
96
+ });
97
+ export default datalog;
@@ -0,0 +1,2 @@
1
+ export { fennel } from "./";
2
+ export { fennel as default } from "./";
@@ -0,0 +1,99 @@
1
+ export const fennel =
2
+ /** @type {import("./index.d.ts").LanguageType<"fennel">} */ ({
3
+ name: "fennel",
4
+ aliases: ["fennel", "fnl"],
5
+ register: {
6
+ name: "fennel",
7
+ caseInsensitive: false,
8
+ unicode: false,
9
+ disableAutodetect: false,
10
+ states: [
11
+ {
12
+ rules: [1, 4, 5, 7, 8],
13
+ keywords: {
14
+ fn: ["keyword", 1],
15
+ lambda: ["keyword", 1],
16
+ λ: ["keyword", 1],
17
+ let: ["keyword", 1],
18
+ local: ["keyword", 1],
19
+ var: ["keyword", 1],
20
+ set: ["keyword", 1],
21
+ global: ["keyword", 1],
22
+ if: ["keyword", 0],
23
+ when: ["keyword", 1],
24
+ each: ["keyword", 1],
25
+ for: ["keyword", 0],
26
+ while: ["keyword", 1],
27
+ do: ["keyword", 1],
28
+ match: ["keyword", 1],
29
+ icollect: ["keyword", 1],
30
+ accumulate: ["keyword", 1],
31
+ collect: ["keyword", 1],
32
+ values: ["keyword", 1],
33
+ not: ["keyword", 0],
34
+ and: ["keyword", 0],
35
+ or: ["keyword", 0],
36
+ true: ["keyword", 1],
37
+ false: ["keyword", 1],
38
+ nil: ["keyword", 1],
39
+ print: ["built_in", 1],
40
+ pairs: ["built_in", 1],
41
+ ipairs: ["built_in", 1],
42
+ table: ["built_in", 1],
43
+ string: ["built_in", 1],
44
+ math: ["built_in", 1],
45
+ os: ["built_in", 1],
46
+ io: ["built_in", 1],
47
+ tostring: ["built_in", 1],
48
+ tonumber: ["built_in", 1],
49
+ type: ["built_in", 1],
50
+ pcall: ["built_in", 1],
51
+ error: ["built_in", 1],
52
+ assert: ["built_in", 1],
53
+ require: ["built_in", 1],
54
+ },
55
+ keywordPattern: "[^\\s()\\[\\]{}\"'`,;]+",
56
+ },
57
+ { rules: [2, 3], scope: "comment", begin: ";", end: "$" },
58
+ {
59
+ relevance: 0,
60
+ rules: [],
61
+ scope: "doctag",
62
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
63
+ end: "(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
64
+ excludeBegin: true,
65
+ },
66
+ {
67
+ rules: [],
68
+ begin:
69
+ "[ ]+((?:I|a|is|so|us|to|at|if|in|it|on|[A-Za-z]+['](d|ve|re|ll|t|s|n)|[A-Za-z]+[-][a-z]+|[A-Za-z][a-z]{2,})[.]?[:]?([.][ ]|[ ])){3}",
70
+ end: "\\B|\\b",
71
+ },
72
+ {
73
+ relevance: 0,
74
+ rules: [],
75
+ scope: "symbol",
76
+ begin: ":[A-Za-z_][\\w-]*",
77
+ end: "\\B|\\b",
78
+ },
79
+ { rules: [6], scope: "string", begin: '"', end: '"' },
80
+ { relevance: 0, rules: [], begin: "\\\\[\\s\\S]", end: "\\B|\\b" },
81
+ {
82
+ relevance: 0,
83
+ rules: [],
84
+ scope: "number",
85
+ begin: "\\b0[xX][0-9a-fA-F]+\\b",
86
+ end: "\\B|\\b",
87
+ },
88
+ {
89
+ relevance: 0,
90
+ rules: [],
91
+ scope: "number",
92
+ begin: "\\b\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\b",
93
+ end: "\\B|\\b",
94
+ },
95
+ ],
96
+ aliases: ["fennel", "fnl"],
97
+ },
98
+ });
99
+ export default fennel;
@@ -0,0 +1,2 @@
1
+ export { idris } from "./";
2
+ export { idris as default } from "./";
@@ -0,0 +1,97 @@
1
+ export const idris =
2
+ /** @type {import("./index.d.ts").LanguageType<"idris">} */ ({
3
+ name: "idris",
4
+ aliases: ["idris", "idr"],
5
+ register: {
6
+ name: "idris",
7
+ caseInsensitive: false,
8
+ unicode: false,
9
+ disableAutodetect: false,
10
+ states: [
11
+ {
12
+ rules: [1, 4, 5, 7, 8, 9],
13
+ keywords: {
14
+ module: ["keyword", 1],
15
+ import: ["keyword", 1],
16
+ data: ["keyword", 1],
17
+ record: ["keyword", 1],
18
+ interface: ["keyword", 1],
19
+ implementation: ["keyword", 1],
20
+ namespace: ["keyword", 1],
21
+ where: ["keyword", 1],
22
+ do: ["keyword", 1],
23
+ let: ["keyword", 1],
24
+ in: ["keyword", 0],
25
+ case: ["keyword", 1],
26
+ of: ["keyword", 0],
27
+ if: ["keyword", 0],
28
+ then: ["keyword", 0],
29
+ else: ["keyword", 1],
30
+ class: ["keyword", 1],
31
+ instance: ["keyword", 1],
32
+ mutual: ["keyword", 1],
33
+ parameters: ["keyword", 1],
34
+ using: ["keyword", 1],
35
+ postulate: ["keyword", 1],
36
+ proof: ["keyword", 1],
37
+ rewrite: ["keyword", 1],
38
+ with: ["keyword", 1],
39
+ public: ["keyword", 1],
40
+ export: ["keyword", 1],
41
+ total: ["keyword", 1],
42
+ covering: ["keyword", 1],
43
+ partial: ["keyword", 1],
44
+ infixl: ["keyword", 1],
45
+ infixr: ["keyword", 1],
46
+ infix: ["keyword", 1],
47
+ auto: ["keyword", 1],
48
+ default: ["keyword", 1],
49
+ True: ["literal", 1],
50
+ False: ["literal", 1],
51
+ },
52
+ keywordPattern: "\\w+",
53
+ },
54
+ { rules: [2, 3], scope: "comment", begin: "--", end: "$" },
55
+ {
56
+ relevance: 0,
57
+ rules: [],
58
+ scope: "doctag",
59
+ begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
60
+ end: "(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",
61
+ excludeBegin: true,
62
+ },
63
+ {
64
+ rules: [],
65
+ begin:
66
+ "[ ]+((?:I|a|is|so|us|to|at|if|in|it|on|[A-Za-z]+['](d|ve|re|ll|t|s|n)|[A-Za-z]+[-][a-z]+|[A-Za-z][a-z]{2,})[.]?[:]?([.][ ]|[ ])){3}",
67
+ end: "\\B|\\b",
68
+ },
69
+ { rules: [4], scope: "comment", begin: "\\{-", end: "-\\}" },
70
+ { rules: [6], scope: "string", begin: '"', end: '"' },
71
+ { relevance: 0, rules: [], begin: "\\\\[\\s\\S]", end: "\\B|\\b" },
72
+ {
73
+ relevance: 0,
74
+ rules: [],
75
+ scope: "string",
76
+ begin: "'(?:[^'\\\\]|\\\\.)'",
77
+ end: "\\B|\\b",
78
+ },
79
+ {
80
+ relevance: 0,
81
+ rules: [],
82
+ scope: "type",
83
+ begin: "\\b(?!True\\b|False\\b)[A-Z][\\w']*",
84
+ end: "\\B|\\b",
85
+ },
86
+ {
87
+ relevance: 0,
88
+ rules: [],
89
+ scope: "number",
90
+ begin: "\\b\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?\\b",
91
+ end: "\\B|\\b",
92
+ },
93
+ ],
94
+ aliases: ["idris", "idr"],
95
+ },
96
+ });
97
+ export default idris;