react-ai-renderer 0.1.5 → 0.1.6

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/dist/index.js CHANGED
@@ -8521,12 +8521,12 @@ function ruby(Prism) {
8521
8521
  })(Prism);
8522
8522
  }
8523
8523
 
8524
- var refractorRuby$1 = ruby_1;
8524
+ var refractorRuby = ruby_1;
8525
8525
  var crystal_1 = crystal;
8526
8526
  crystal.displayName = 'crystal';
8527
8527
  crystal.aliases = [];
8528
8528
  function crystal(Prism) {
8529
- Prism.register(refractorRuby$1)
8529
+ Prism.register(refractorRuby)
8530
8530
  ;(function (Prism) {
8531
8531
  Prism.languages.crystal = Prism.languages.extend('ruby', {
8532
8532
  keyword: [
@@ -9004,44 +9004,53 @@ function csv(Prism) {
9004
9004
  };
9005
9005
  }
9006
9006
 
9007
- var cypher_1 = cypher;
9008
- cypher.displayName = 'cypher';
9009
- cypher.aliases = [];
9010
- function cypher(Prism) {
9011
- Prism.languages.cypher = {
9012
- // https://neo4j.com/docs/cypher-manual/current/syntax/comments/
9013
- comment: /\/\/.*/,
9014
- string: {
9015
- pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
9016
- greedy: true
9017
- },
9018
- 'class-name': {
9019
- pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
9020
- lookbehind: true,
9021
- greedy: true
9022
- },
9023
- relationship: {
9024
- pattern:
9025
- /(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
9026
- lookbehind: true,
9027
- greedy: true,
9028
- alias: 'property'
9029
- },
9030
- identifier: {
9031
- pattern: /`(?:[^`\\\r\n])*`/,
9032
- greedy: true
9033
- },
9034
- variable: /\$\w+/,
9035
- // https://neo4j.com/docs/cypher-manual/current/syntax/reserved/
9036
- keyword:
9037
- /\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,
9038
- function: /\b\w+\b(?=\s*\()/,
9039
- boolean: /\b(?:false|null|true)\b/i,
9040
- number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
9041
- // https://neo4j.com/docs/cypher-manual/current/syntax/operators/
9042
- operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
9043
- punctuation: /[()[\]{},;.]/
9044
- };
9007
+ var cypher_1;
9008
+ var hasRequiredCypher;
9009
+
9010
+ function requireCypher () {
9011
+ if (hasRequiredCypher) return cypher_1;
9012
+ hasRequiredCypher = 1;
9013
+
9014
+ cypher_1 = cypher;
9015
+ cypher.displayName = 'cypher';
9016
+ cypher.aliases = [];
9017
+ function cypher(Prism) {
9018
+ Prism.languages.cypher = {
9019
+ // https://neo4j.com/docs/cypher-manual/current/syntax/comments/
9020
+ comment: /\/\/.*/,
9021
+ string: {
9022
+ pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
9023
+ greedy: true
9024
+ },
9025
+ 'class-name': {
9026
+ pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
9027
+ lookbehind: true,
9028
+ greedy: true
9029
+ },
9030
+ relationship: {
9031
+ pattern:
9032
+ /(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
9033
+ lookbehind: true,
9034
+ greedy: true,
9035
+ alias: 'property'
9036
+ },
9037
+ identifier: {
9038
+ pattern: /`(?:[^`\\\r\n])*`/,
9039
+ greedy: true
9040
+ },
9041
+ variable: /\$\w+/,
9042
+ // https://neo4j.com/docs/cypher-manual/current/syntax/reserved/
9043
+ keyword:
9044
+ /\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,
9045
+ function: /\b\w+\b(?=\s*\()/,
9046
+ boolean: /\b(?:false|null|true)\b/i,
9047
+ number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
9048
+ // https://neo4j.com/docs/cypher-manual/current/syntax/operators/
9049
+ operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
9050
+ punctuation: /[()[\]{},;.]/
9051
+ };
9052
+ }
9053
+ return cypher_1;
9045
9054
  }
9046
9055
 
9047
9056
  var d_1 = d;
@@ -9130,88 +9139,97 @@ function d(Prism) {
9130
9139
  });
9131
9140
  }
9132
9141
 
9133
- var dart_1 = dart;
9134
- dart.displayName = 'dart';
9135
- dart.aliases = [];
9136
- function dart(Prism) {
9142
+ var dart_1;
9143
+ var hasRequiredDart;
9144
+
9145
+ function requireDart () {
9146
+ if (hasRequiredDart) return dart_1;
9147
+ hasRequiredDart = 1;
9148
+
9149
+ dart_1 = dart;
9150
+ dart.displayName = 'dart';
9151
+ dart.aliases = [];
9152
+ function dart(Prism) {
9137
9153
  (function (Prism) {
9138
- var keywords = [
9139
- /\b(?:async|sync|yield)\*/,
9140
- /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/
9141
- ]; // Handles named imports, such as http.Client
9142
- var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/
9143
- .source; // based on the dart naming conventions
9144
- var className = {
9145
- pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
9146
- lookbehind: true,
9147
- inside: {
9148
- namespace: {
9149
- pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
9150
- inside: {
9151
- punctuation: /\./
9152
- }
9153
- }
9154
- }
9155
- };
9156
- Prism.languages.dart = Prism.languages.extend('clike', {
9157
- 'class-name': [
9158
- className,
9159
- {
9160
- // variables and parameters
9161
- // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
9162
- pattern: RegExp(
9163
- packagePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source
9164
- ),
9165
- lookbehind: true,
9166
- inside: className.inside
9167
- }
9168
- ],
9169
- keyword: keywords,
9170
- operator:
9171
- /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/
9172
- });
9173
- Prism.languages.insertBefore('dart', 'string', {
9174
- 'string-literal': {
9175
- pattern:
9176
- /r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,
9177
- greedy: true,
9178
- inside: {
9179
- interpolation: {
9180
- pattern:
9181
- /((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
9182
- lookbehind: true,
9183
- inside: {
9184
- punctuation: /^\$\{?|\}$/,
9185
- expression: {
9186
- pattern: /[\s\S]+/,
9187
- inside: Prism.languages.dart
9188
- }
9189
- }
9190
- },
9191
- string: /[\s\S]+/
9192
- }
9193
- },
9194
- string: undefined
9195
- });
9196
- Prism.languages.insertBefore('dart', 'class-name', {
9197
- metadata: {
9198
- pattern: /@\w+/,
9199
- alias: 'function'
9200
- }
9201
- });
9202
- Prism.languages.insertBefore('dart', 'class-name', {
9203
- generics: {
9204
- pattern:
9205
- /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
9206
- inside: {
9207
- 'class-name': className,
9208
- keyword: keywords,
9209
- punctuation: /[<>(),.:]/,
9210
- operator: /[?&|]/
9211
- }
9212
- }
9213
- });
9214
- })(Prism);
9154
+ var keywords = [
9155
+ /\b(?:async|sync|yield)\*/,
9156
+ /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/
9157
+ ]; // Handles named imports, such as http.Client
9158
+ var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/
9159
+ .source; // based on the dart naming conventions
9160
+ var className = {
9161
+ pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
9162
+ lookbehind: true,
9163
+ inside: {
9164
+ namespace: {
9165
+ pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,
9166
+ inside: {
9167
+ punctuation: /\./
9168
+ }
9169
+ }
9170
+ }
9171
+ };
9172
+ Prism.languages.dart = Prism.languages.extend('clike', {
9173
+ 'class-name': [
9174
+ className,
9175
+ {
9176
+ // variables and parameters
9177
+ // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
9178
+ pattern: RegExp(
9179
+ packagePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source
9180
+ ),
9181
+ lookbehind: true,
9182
+ inside: className.inside
9183
+ }
9184
+ ],
9185
+ keyword: keywords,
9186
+ operator:
9187
+ /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/
9188
+ });
9189
+ Prism.languages.insertBefore('dart', 'string', {
9190
+ 'string-literal': {
9191
+ pattern:
9192
+ /r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,
9193
+ greedy: true,
9194
+ inside: {
9195
+ interpolation: {
9196
+ pattern:
9197
+ /((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
9198
+ lookbehind: true,
9199
+ inside: {
9200
+ punctuation: /^\$\{?|\}$/,
9201
+ expression: {
9202
+ pattern: /[\s\S]+/,
9203
+ inside: Prism.languages.dart
9204
+ }
9205
+ }
9206
+ },
9207
+ string: /[\s\S]+/
9208
+ }
9209
+ },
9210
+ string: undefined
9211
+ });
9212
+ Prism.languages.insertBefore('dart', 'class-name', {
9213
+ metadata: {
9214
+ pattern: /@\w+/,
9215
+ alias: 'function'
9216
+ }
9217
+ });
9218
+ Prism.languages.insertBefore('dart', 'class-name', {
9219
+ generics: {
9220
+ pattern:
9221
+ /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,
9222
+ inside: {
9223
+ 'class-name': className,
9224
+ keyword: keywords,
9225
+ punctuation: /[<>(),.:]/,
9226
+ operator: /[?&|]/
9227
+ }
9228
+ }
9229
+ });
9230
+ })(Prism);
9231
+ }
9232
+ return dart_1;
9215
9233
  }
9216
9234
 
9217
9235
  var dataweave_1 = dataweave;
@@ -9298,89 +9316,80 @@ function dax(Prism) {
9298
9316
  };
9299
9317
  }
9300
9318
 
9301
- var dhall_1;
9302
- var hasRequiredDhall;
9303
-
9304
- function requireDhall () {
9305
- if (hasRequiredDhall) return dhall_1;
9306
- hasRequiredDhall = 1;
9307
-
9308
- dhall_1 = dhall;
9309
- dhall.displayName = 'dhall';
9310
- dhall.aliases = [];
9311
- function dhall(Prism) {
9312
- // ABNF grammar:
9313
- // https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf
9314
- Prism.languages.dhall = {
9315
- // Multi-line comments can be nested. E.g. {- foo {- bar -} -}
9316
- // The multi-line pattern is essentially this:
9317
- // \{-(?:[^-{]|-(?!\})|\{(?!-)|<SELF>)*-\}
9318
- comment:
9319
- /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
9320
- string: {
9321
- pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
9322
- greedy: true,
9323
- inside: {
9324
- interpolation: {
9325
- pattern: /\$\{[^{}]*\}/,
9326
- inside: {
9327
- expression: {
9328
- pattern: /(^\$\{)[\s\S]+(?=\}$)/,
9329
- lookbehind: true,
9330
- alias: 'language-dhall',
9331
- inside: null // see blow
9332
- },
9333
- punctuation: /\$\{|\}/
9334
- }
9335
- }
9336
- }
9337
- },
9338
- label: {
9339
- pattern: /`[^`]*`/,
9340
- greedy: true
9341
- },
9342
- url: {
9343
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596
9344
- pattern:
9345
- /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
9346
- greedy: true
9347
- },
9348
- env: {
9349
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661
9350
- pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
9351
- greedy: true,
9352
- inside: {
9353
- function: /^env/,
9354
- operator: /^:/,
9355
- variable: /[\s\S]+/
9356
- }
9357
- },
9358
- hash: {
9359
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725
9360
- pattern: /\bsha256:[\da-fA-F]{64}\b/,
9361
- inside: {
9362
- function: /sha256/,
9363
- operator: /:/,
9364
- number: /[\da-fA-F]{64}/
9365
- }
9366
- },
9367
- // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359
9368
- keyword:
9369
- /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
9370
- builtin: /\b(?:None|Some)\b/,
9371
- boolean: /\b(?:False|True)\b/,
9372
- number:
9373
- /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
9374
- operator:
9375
- /\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
9376
- punctuation: /\.\.|[{}\[\](),./]/,
9377
- // we'll just assume that every capital word left is a type name
9378
- 'class-name': /\b[A-Z]\w*\b/
9379
- };
9380
- Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
9381
- Prism.languages.dhall;
9382
- }
9383
- return dhall_1;
9319
+ var dhall_1 = dhall;
9320
+ dhall.displayName = 'dhall';
9321
+ dhall.aliases = [];
9322
+ function dhall(Prism) {
9323
+ // ABNF grammar:
9324
+ // https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf
9325
+ Prism.languages.dhall = {
9326
+ // Multi-line comments can be nested. E.g. {- foo {- bar -} -}
9327
+ // The multi-line pattern is essentially this:
9328
+ // \{-(?:[^-{]|-(?!\})|\{(?!-)|<SELF>)*-\}
9329
+ comment:
9330
+ /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,
9331
+ string: {
9332
+ pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,
9333
+ greedy: true,
9334
+ inside: {
9335
+ interpolation: {
9336
+ pattern: /\$\{[^{}]*\}/,
9337
+ inside: {
9338
+ expression: {
9339
+ pattern: /(^\$\{)[\s\S]+(?=\}$)/,
9340
+ lookbehind: true,
9341
+ alias: 'language-dhall',
9342
+ inside: null // see blow
9343
+ },
9344
+ punctuation: /\$\{|\}/
9345
+ }
9346
+ }
9347
+ }
9348
+ },
9349
+ label: {
9350
+ pattern: /`[^`]*`/,
9351
+ greedy: true
9352
+ },
9353
+ url: {
9354
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596
9355
+ pattern:
9356
+ /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,
9357
+ greedy: true
9358
+ },
9359
+ env: {
9360
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661
9361
+ pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,
9362
+ greedy: true,
9363
+ inside: {
9364
+ function: /^env/,
9365
+ operator: /^:/,
9366
+ variable: /[\s\S]+/
9367
+ }
9368
+ },
9369
+ hash: {
9370
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725
9371
+ pattern: /\bsha256:[\da-fA-F]{64}\b/,
9372
+ inside: {
9373
+ function: /sha256/,
9374
+ operator: /:/,
9375
+ number: /[\da-fA-F]{64}/
9376
+ }
9377
+ },
9378
+ // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359
9379
+ keyword:
9380
+ /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,
9381
+ builtin: /\b(?:None|Some)\b/,
9382
+ boolean: /\b(?:False|True)\b/,
9383
+ number:
9384
+ /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,
9385
+ operator:
9386
+ /\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,
9387
+ punctuation: /\.\.|[{}\[\](),./]/,
9388
+ // we'll just assume that every capital word left is a type name
9389
+ 'class-name': /\b[A-Z]\w*\b/
9390
+ };
9391
+ Prism.languages.dhall.string.inside.interpolation.inside.expression.inside =
9392
+ Prism.languages.dhall;
9384
9393
  }
9385
9394
 
9386
9395
  var diff_1 = diff;
@@ -9573,96 +9582,104 @@ function requireMarkupTemplating () {
9573
9582
  return markupTemplating_1;
9574
9583
  }
9575
9584
 
9576
- var refractorMarkupTemplating$3 = requireMarkupTemplating();
9577
- var django_1 = django;
9578
- django.displayName = 'django';
9579
- django.aliases = ['jinja2'];
9580
- function django(Prism) {
9581
- Prism.register(refractorMarkupTemplating$3)
9582
- // Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
9583
- // Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
9584
- ;(function (Prism) {
9585
- Prism.languages.django = {
9586
- comment: /^\{#[\s\S]*?#\}$/,
9587
- tag: {
9588
- pattern: /(^\{%[+-]?\s*)\w+/,
9589
- lookbehind: true,
9590
- alias: 'keyword'
9591
- },
9592
- delimiter: {
9593
- pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
9594
- alias: 'punctuation'
9595
- },
9596
- string: {
9597
- pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
9598
- greedy: true
9599
- },
9600
- filter: {
9601
- pattern: /(\|)\w+/,
9602
- lookbehind: true,
9603
- alias: 'function'
9604
- },
9605
- test: {
9606
- pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
9607
- lookbehind: true,
9608
- alias: 'function'
9609
- },
9610
- function: /\b[a-z_]\w+(?=\s*\()/i,
9611
- keyword:
9612
- /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
9613
- operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
9614
- number: /\b\d+(?:\.\d+)?\b/,
9615
- boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
9616
- variable: /\b\w+\b/,
9617
- punctuation: /[{}[\](),.:;]/
9618
- };
9619
- var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
9620
- var markupTemplating = Prism.languages['markup-templating'];
9621
- Prism.hooks.add('before-tokenize', function (env) {
9622
- markupTemplating.buildPlaceholders(env, 'django', pattern);
9623
- });
9624
- Prism.hooks.add('after-tokenize', function (env) {
9625
- markupTemplating.tokenizePlaceholders(env, 'django');
9626
- }); // Add an Jinja2 alias
9627
- Prism.languages.jinja2 = Prism.languages.django;
9628
- Prism.hooks.add('before-tokenize', function (env) {
9629
- markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
9630
- });
9631
- Prism.hooks.add('after-tokenize', function (env) {
9632
- markupTemplating.tokenizePlaceholders(env, 'jinja2');
9633
- });
9634
- })(Prism);
9635
- }
9585
+ var django_1;
9586
+ var hasRequiredDjango;
9636
9587
 
9637
- var dnsZoneFile_1 = dnsZoneFile;
9638
- dnsZoneFile.displayName = 'dnsZoneFile';
9639
- dnsZoneFile.aliases = [];
9640
- function dnsZoneFile(Prism) {
9641
- Prism.languages['dns-zone-file'] = {
9642
- comment: /;.*/,
9643
- string: {
9644
- pattern: /"(?:\\.|[^"\\\r\n])*"/,
9645
- greedy: true
9646
- },
9647
- variable: [
9648
- {
9649
- pattern: /(^\$ORIGIN[ \t]+)\S+/m,
9650
- lookbehind: true
9651
- },
9652
- {
9653
- pattern: /(^|\s)@(?=\s|$)/,
9654
- lookbehind: true
9655
- }
9656
- ],
9657
- keyword: /^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,
9658
- class: {
9659
- // https://tools.ietf.org/html/rfc1035#page-13
9660
- pattern: /(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,
9661
- lookbehind: true,
9662
- alias: 'keyword'
9663
- },
9664
- type: {
9665
- // https://en.wikipedia.org/wiki/List_of_DNS_record_types
9588
+ function requireDjango () {
9589
+ if (hasRequiredDjango) return django_1;
9590
+ hasRequiredDjango = 1;
9591
+ var refractorMarkupTemplating = requireMarkupTemplating();
9592
+ django_1 = django;
9593
+ django.displayName = 'django';
9594
+ django.aliases = ['jinja2'];
9595
+ function django(Prism) {
9596
+ Prism.register(refractorMarkupTemplating)
9597
+ // Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
9598
+ // Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
9599
+ ;(function (Prism) {
9600
+ Prism.languages.django = {
9601
+ comment: /^\{#[\s\S]*?#\}$/,
9602
+ tag: {
9603
+ pattern: /(^\{%[+-]?\s*)\w+/,
9604
+ lookbehind: true,
9605
+ alias: 'keyword'
9606
+ },
9607
+ delimiter: {
9608
+ pattern: /^\{[{%][+-]?|[+-]?[}%]\}$/,
9609
+ alias: 'punctuation'
9610
+ },
9611
+ string: {
9612
+ pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
9613
+ greedy: true
9614
+ },
9615
+ filter: {
9616
+ pattern: /(\|)\w+/,
9617
+ lookbehind: true,
9618
+ alias: 'function'
9619
+ },
9620
+ test: {
9621
+ pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/,
9622
+ lookbehind: true,
9623
+ alias: 'function'
9624
+ },
9625
+ function: /\b[a-z_]\w+(?=\s*\()/i,
9626
+ keyword:
9627
+ /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,
9628
+ operator: /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
9629
+ number: /\b\d+(?:\.\d+)?\b/,
9630
+ boolean: /[Ff]alse|[Nn]one|[Tt]rue/,
9631
+ variable: /\b\w+\b/,
9632
+ punctuation: /[{}[\](),.:;]/
9633
+ };
9634
+ var pattern = /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g;
9635
+ var markupTemplating = Prism.languages['markup-templating'];
9636
+ Prism.hooks.add('before-tokenize', function (env) {
9637
+ markupTemplating.buildPlaceholders(env, 'django', pattern);
9638
+ });
9639
+ Prism.hooks.add('after-tokenize', function (env) {
9640
+ markupTemplating.tokenizePlaceholders(env, 'django');
9641
+ }); // Add an Jinja2 alias
9642
+ Prism.languages.jinja2 = Prism.languages.django;
9643
+ Prism.hooks.add('before-tokenize', function (env) {
9644
+ markupTemplating.buildPlaceholders(env, 'jinja2', pattern);
9645
+ });
9646
+ Prism.hooks.add('after-tokenize', function (env) {
9647
+ markupTemplating.tokenizePlaceholders(env, 'jinja2');
9648
+ });
9649
+ })(Prism);
9650
+ }
9651
+ return django_1;
9652
+ }
9653
+
9654
+ var dnsZoneFile_1 = dnsZoneFile;
9655
+ dnsZoneFile.displayName = 'dnsZoneFile';
9656
+ dnsZoneFile.aliases = [];
9657
+ function dnsZoneFile(Prism) {
9658
+ Prism.languages['dns-zone-file'] = {
9659
+ comment: /;.*/,
9660
+ string: {
9661
+ pattern: /"(?:\\.|[^"\\\r\n])*"/,
9662
+ greedy: true
9663
+ },
9664
+ variable: [
9665
+ {
9666
+ pattern: /(^\$ORIGIN[ \t]+)\S+/m,
9667
+ lookbehind: true
9668
+ },
9669
+ {
9670
+ pattern: /(^|\s)@(?=\s|$)/,
9671
+ lookbehind: true
9672
+ }
9673
+ ],
9674
+ keyword: /^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,
9675
+ class: {
9676
+ // https://tools.ietf.org/html/rfc1035#page-13
9677
+ pattern: /(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,
9678
+ lookbehind: true,
9679
+ alias: 'keyword'
9680
+ },
9681
+ type: {
9682
+ // https://en.wikipedia.org/wiki/List_of_DNS_record_types
9666
9683
  pattern:
9667
9684
  /(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,
9668
9685
  lookbehind: true,
@@ -9795,96 +9812,87 @@ function docker(Prism) {
9795
9812
  })(Prism);
9796
9813
  }
9797
9814
 
9798
- var dot_1;
9799
- var hasRequiredDot;
9800
-
9801
- function requireDot () {
9802
- if (hasRequiredDot) return dot_1;
9803
- hasRequiredDot = 1;
9804
-
9805
- dot_1 = dot;
9806
- dot.displayName = 'dot';
9807
- dot.aliases = ['gv'];
9808
- function dot(Prism) {
9815
+ var dot_1 = dot;
9816
+ dot.displayName = 'dot';
9817
+ dot.aliases = ['gv'];
9818
+ function dot(Prism) {
9809
9819
  (function (Prism) {
9810
- var ID =
9811
- '(?:' +
9812
- [
9813
- // an identifier
9814
- /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, // a number
9815
- /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, // a double-quoted string
9816
- /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, // HTML-like string
9817
- /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/
9818
- .source
9819
- ].join('|') +
9820
- ')';
9821
- var IDInside = {
9822
- markup: {
9823
- pattern: /(^<)[\s\S]+(?=>$)/,
9824
- lookbehind: true,
9825
- alias: ['language-markup', 'language-html', 'language-xml'],
9826
- inside: Prism.languages.markup
9827
- }
9828
- };
9829
- /**
9830
- * @param {string} source
9831
- * @param {string} flags
9832
- * @returns {RegExp}
9833
- */
9834
- function withID(source, flags) {
9835
- return RegExp(
9836
- source.replace(/<ID>/g, function () {
9837
- return ID
9838
- }),
9839
- flags
9840
- )
9841
- }
9842
- Prism.languages.dot = {
9843
- comment: {
9844
- pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
9845
- greedy: true
9846
- },
9847
- 'graph-name': {
9848
- pattern: withID(
9849
- /(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,
9850
- 'i'
9851
- ),
9852
- lookbehind: true,
9853
- greedy: true,
9854
- alias: 'class-name',
9855
- inside: IDInside
9856
- },
9857
- 'attr-value': {
9858
- pattern: withID(/(=[ \t\r\n]*)<ID>/.source),
9859
- lookbehind: true,
9860
- greedy: true,
9861
- inside: IDInside
9862
- },
9863
- 'attr-name': {
9864
- pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
9865
- lookbehind: true,
9866
- greedy: true,
9867
- inside: IDInside
9868
- },
9869
- keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
9870
- 'compass-point': {
9871
- pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
9872
- lookbehind: true,
9873
- alias: 'builtin'
9874
- },
9875
- node: {
9876
- pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
9877
- lookbehind: true,
9878
- greedy: true,
9879
- inside: IDInside
9880
- },
9881
- operator: /[=:]|-[->]/,
9882
- punctuation: /[\[\]{};,]/
9883
- };
9884
- Prism.languages.gv = Prism.languages.dot;
9885
- })(Prism);
9886
- }
9887
- return dot_1;
9820
+ var ID =
9821
+ '(?:' +
9822
+ [
9823
+ // an identifier
9824
+ /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, // a number
9825
+ /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, // a double-quoted string
9826
+ /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, // HTML-like string
9827
+ /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/
9828
+ .source
9829
+ ].join('|') +
9830
+ ')';
9831
+ var IDInside = {
9832
+ markup: {
9833
+ pattern: /(^<)[\s\S]+(?=>$)/,
9834
+ lookbehind: true,
9835
+ alias: ['language-markup', 'language-html', 'language-xml'],
9836
+ inside: Prism.languages.markup
9837
+ }
9838
+ };
9839
+ /**
9840
+ * @param {string} source
9841
+ * @param {string} flags
9842
+ * @returns {RegExp}
9843
+ */
9844
+ function withID(source, flags) {
9845
+ return RegExp(
9846
+ source.replace(/<ID>/g, function () {
9847
+ return ID
9848
+ }),
9849
+ flags
9850
+ )
9851
+ }
9852
+ Prism.languages.dot = {
9853
+ comment: {
9854
+ pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
9855
+ greedy: true
9856
+ },
9857
+ 'graph-name': {
9858
+ pattern: withID(
9859
+ /(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,
9860
+ 'i'
9861
+ ),
9862
+ lookbehind: true,
9863
+ greedy: true,
9864
+ alias: 'class-name',
9865
+ inside: IDInside
9866
+ },
9867
+ 'attr-value': {
9868
+ pattern: withID(/(=[ \t\r\n]*)<ID>/.source),
9869
+ lookbehind: true,
9870
+ greedy: true,
9871
+ inside: IDInside
9872
+ },
9873
+ 'attr-name': {
9874
+ pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
9875
+ lookbehind: true,
9876
+ greedy: true,
9877
+ inside: IDInside
9878
+ },
9879
+ keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
9880
+ 'compass-point': {
9881
+ pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
9882
+ lookbehind: true,
9883
+ alias: 'builtin'
9884
+ },
9885
+ node: {
9886
+ pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
9887
+ lookbehind: true,
9888
+ greedy: true,
9889
+ inside: IDInside
9890
+ },
9891
+ operator: /[=:]|-[->]/,
9892
+ punctuation: /[\[\]{};,]/
9893
+ };
9894
+ Prism.languages.gv = Prism.languages.dot;
9895
+ })(Prism);
9888
9896
  }
9889
9897
 
9890
9898
  var ebnf_1;
@@ -9955,1632 +9963,1764 @@ function editorconfig(Prism) {
9955
9963
  };
9956
9964
  }
9957
9965
 
9958
- var eiffel_1 = eiffel;
9959
- eiffel.displayName = 'eiffel';
9960
- eiffel.aliases = [];
9961
- function eiffel(Prism) {
9962
- Prism.languages.eiffel = {
9963
- comment: /--.*/,
9964
- string: [
9965
- // Aligned-verbatim-strings
9966
- {
9967
- pattern: /"([^[]*)\[[\s\S]*?\]\1"/,
9968
- greedy: true
9969
- }, // Non-aligned-verbatim-strings
9970
- {
9971
- pattern: /"([^{]*)\{[\s\S]*?\}\1"/,
9972
- greedy: true
9973
- }, // Single-line string
9974
- {
9975
- pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,
9976
- greedy: true
9977
- }
9978
- ],
9979
- // normal char | special char | char code
9980
- char: /'(?:%.|[^%'\r\n])+'/,
9981
- keyword:
9982
- /\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
9983
- boolean: /\b(?:False|True)\b/i,
9984
- // Convention: class-names are always all upper-case characters
9985
- 'class-name': /\b[A-Z][\dA-Z_]*\b/,
9986
- number: [
9987
- // hexa | octal | bin
9988
- /\b0[xcb][\da-f](?:_*[\da-f])*\b/i, // Decimal
9989
- /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i
9990
- ],
9991
- punctuation: /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
9992
- operator: /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
9993
- };
9994
- }
9966
+ var eiffel_1;
9967
+ var hasRequiredEiffel;
9995
9968
 
9996
- var refractorMarkupTemplating$2 = requireMarkupTemplating();
9997
- var ejs_1 = ejs;
9998
- ejs.displayName = 'ejs';
9999
- ejs.aliases = ['eta'];
10000
- function ejs(Prism) {
10001
- Prism.register(refractorMarkupTemplating$2)
10002
- ;(function (Prism) {
10003
- Prism.languages.ejs = {
10004
- delimiter: {
10005
- pattern: /^<%[-_=]?|[-_]?%>$/,
10006
- alias: 'punctuation'
10007
- },
10008
- comment: /^#[\s\S]*/,
10009
- 'language-javascript': {
10010
- pattern: /[\s\S]+/,
10011
- inside: Prism.languages.javascript
10012
- }
10013
- };
10014
- Prism.hooks.add('before-tokenize', function (env) {
10015
- var ejsPattern = /<%(?!%)[\s\S]+?%>/g;
10016
- Prism.languages['markup-templating'].buildPlaceholders(
10017
- env,
10018
- 'ejs',
10019
- ejsPattern
10020
- );
10021
- });
10022
- Prism.hooks.add('after-tokenize', function (env) {
10023
- Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs');
10024
- });
10025
- Prism.languages.eta = Prism.languages.ejs;
10026
- })(Prism);
10027
- }
9969
+ function requireEiffel () {
9970
+ if (hasRequiredEiffel) return eiffel_1;
9971
+ hasRequiredEiffel = 1;
10028
9972
 
10029
- var elixir_1 = elixir;
10030
- elixir.displayName = 'elixir';
10031
- elixir.aliases = [];
10032
- function elixir(Prism) {
10033
- Prism.languages.elixir = {
10034
- doc: {
10035
- pattern:
10036
- /@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,
10037
- inside: {
10038
- attribute: /^@\w+/,
10039
- string: /['"][\s\S]+/
10040
- }
10041
- },
10042
- comment: {
10043
- pattern: /#.*/,
10044
- greedy: true
10045
- },
10046
- // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r<foo>
10047
- regex: {
10048
- pattern:
10049
- /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,
10050
- greedy: true
10051
- },
10052
- string: [
10053
- {
10054
- // ~s"""foo""" (multi-line), ~s'''foo''' (multi-line), ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo} (with interpolation care), ~s<foo>
10055
- pattern:
10056
- /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,
10057
- greedy: true,
10058
- inside: {
10059
- // See interpolation below
10060
- }
10061
- },
10062
- {
10063
- pattern: /("""|''')[\s\S]*?\1/,
10064
- greedy: true,
10065
- inside: {
10066
- // See interpolation below
10067
- }
10068
- },
10069
- {
10070
- // Multi-line strings are allowed
10071
- pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
10072
- greedy: true,
10073
- inside: {
10074
- // See interpolation below
10075
- }
10076
- }
10077
- ],
10078
- atom: {
10079
- // Look-behind prevents bad highlighting of the :: operator
10080
- pattern: /(^|[^:]):\w+/,
10081
- lookbehind: true,
10082
- alias: 'symbol'
10083
- },
10084
- module: {
10085
- pattern: /\b[A-Z]\w*\b/,
10086
- alias: 'class-name'
10087
- },
10088
- // Look-ahead prevents bad highlighting of the :: operator
10089
- 'attr-name': /\b\w+\??:(?!:)/,
10090
- argument: {
10091
- // Look-behind prevents bad highlighting of the && operator
10092
- pattern: /(^|[^&])&\d+/,
10093
- lookbehind: true,
10094
- alias: 'variable'
10095
- },
10096
- attribute: {
10097
- pattern: /@\w+/,
10098
- alias: 'variable'
10099
- },
10100
- function: /\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,
10101
- number: /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,
10102
- keyword:
10103
- /\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,
10104
- boolean: /\b(?:false|nil|true)\b/,
10105
- operator: [
10106
- /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,
10107
- {
10108
- // We don't want to match <<
10109
- pattern: /([^<])<(?!<)/,
10110
- lookbehind: true
10111
- },
10112
- {
10113
- // We don't want to match >>
10114
- pattern: /([^>])>(?!>)/,
10115
- lookbehind: true
10116
- }
10117
- ],
10118
- punctuation: /<<|>>|[.,%\[\]{}()]/
10119
- };
10120
- Prism.languages.elixir.string.forEach(function (o) {
10121
- o.inside = {
10122
- interpolation: {
10123
- pattern: /#\{[^}]+\}/,
10124
- inside: {
10125
- delimiter: {
10126
- pattern: /^#\{|\}$/,
10127
- alias: 'punctuation'
10128
- },
10129
- rest: Prism.languages.elixir
10130
- }
10131
- }
10132
- };
10133
- });
9973
+ eiffel_1 = eiffel;
9974
+ eiffel.displayName = 'eiffel';
9975
+ eiffel.aliases = [];
9976
+ function eiffel(Prism) {
9977
+ Prism.languages.eiffel = {
9978
+ comment: /--.*/,
9979
+ string: [
9980
+ // Aligned-verbatim-strings
9981
+ {
9982
+ pattern: /"([^[]*)\[[\s\S]*?\]\1"/,
9983
+ greedy: true
9984
+ }, // Non-aligned-verbatim-strings
9985
+ {
9986
+ pattern: /"([^{]*)\{[\s\S]*?\}\1"/,
9987
+ greedy: true
9988
+ }, // Single-line string
9989
+ {
9990
+ pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,
9991
+ greedy: true
9992
+ }
9993
+ ],
9994
+ // normal char | special char | char code
9995
+ char: /'(?:%.|[^%'\r\n])+'/,
9996
+ keyword:
9997
+ /\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
9998
+ boolean: /\b(?:False|True)\b/i,
9999
+ // Convention: class-names are always all upper-case characters
10000
+ 'class-name': /\b[A-Z][\dA-Z_]*\b/,
10001
+ number: [
10002
+ // hexa | octal | bin
10003
+ /\b0[xcb][\da-f](?:_*[\da-f])*\b/i, // Decimal
10004
+ /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i
10005
+ ],
10006
+ punctuation: /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
10007
+ operator: /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
10008
+ };
10009
+ }
10010
+ return eiffel_1;
10134
10011
  }
10135
10012
 
10136
- var elm_1 = elm;
10137
- elm.displayName = 'elm';
10138
- elm.aliases = [];
10139
- function elm(Prism) {
10140
- Prism.languages.elm = {
10141
- comment: /--.*|\{-[\s\S]*?-\}/,
10142
- char: {
10143
- pattern:
10144
- /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,
10145
- greedy: true
10146
- },
10147
- string: [
10148
- {
10149
- // Multiline strings are wrapped in triple ". Quotes may appear unescaped.
10150
- pattern: /"""[\s\S]*?"""/,
10151
- greedy: true
10152
- },
10153
- {
10154
- pattern: /"(?:[^\\"\r\n]|\\.)*"/,
10155
- greedy: true
10156
- }
10157
- ],
10158
- 'import-statement': {
10159
- // The imported or hidden names are not included in this import
10160
- // statement. This is because we want to highlight those exactly like
10161
- // we do for the names in the program.
10162
- pattern:
10163
- /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,
10164
- lookbehind: true,
10165
- inside: {
10166
- keyword: /\b(?:as|exposing|import)\b/
10167
- }
10168
- },
10169
- keyword:
10170
- /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,
10171
- // These are builtin variables only. Constructors are highlighted later as a constant.
10172
- builtin:
10173
- /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,
10174
- // decimal integers and floating point numbers | hexadecimal integers
10175
- number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,
10176
- // Most of this is needed because of the meaning of a single '.'.
10177
- // If it stands alone freely, it is the function composition.
10178
- // It may also be a separator between a module name and an identifier => no
10179
- // operator. If it comes together with other special characters it is an
10180
- // operator too.
10181
- // Valid operator characters in 0.18: +-/*=.$<>:&|^?%#@~!
10182
- // Ref: https://groups.google.com/forum/#!msg/elm-dev/0AHSnDdkSkQ/E0SVU70JEQAJ
10183
- operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,
10184
- // In Elm, nearly everything is a variable, do not highlight these.
10185
- hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,
10186
- constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,
10187
- punctuation: /[{}[\]|(),.:]/
10188
- };
10189
- }
10013
+ var ejs_1;
10014
+ var hasRequiredEjs;
10190
10015
 
10191
- var refractorRuby = ruby_1;
10192
- var refractorMarkupTemplating$1 = requireMarkupTemplating();
10193
- var erb_1 = erb;
10194
- erb.displayName = 'erb';
10195
- erb.aliases = [];
10196
- function erb(Prism) {
10197
- Prism.register(refractorRuby);
10198
- Prism.register(refractorMarkupTemplating$1)
10199
- ;(function (Prism) {
10200
- Prism.languages.erb = {
10201
- delimiter: {
10202
- pattern: /^(\s*)<%=?|%>(?=\s*$)/,
10203
- lookbehind: true,
10204
- alias: 'punctuation'
10205
- },
10206
- ruby: {
10207
- pattern: /\s*\S[\s\S]*/,
10208
- alias: 'language-ruby',
10209
- inside: Prism.languages.ruby
10210
- }
10211
- };
10212
- Prism.hooks.add('before-tokenize', function (env) {
10213
- var erbPattern =
10214
- /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g;
10215
- Prism.languages['markup-templating'].buildPlaceholders(
10216
- env,
10217
- 'erb',
10218
- erbPattern
10219
- );
10220
- });
10221
- Prism.hooks.add('after-tokenize', function (env) {
10222
- Prism.languages['markup-templating'].tokenizePlaceholders(env, 'erb');
10223
- });
10224
- })(Prism);
10016
+ function requireEjs () {
10017
+ if (hasRequiredEjs) return ejs_1;
10018
+ hasRequiredEjs = 1;
10019
+ var refractorMarkupTemplating = requireMarkupTemplating();
10020
+ ejs_1 = ejs;
10021
+ ejs.displayName = 'ejs';
10022
+ ejs.aliases = ['eta'];
10023
+ function ejs(Prism) {
10024
+ Prism.register(refractorMarkupTemplating)
10025
+ ;(function (Prism) {
10026
+ Prism.languages.ejs = {
10027
+ delimiter: {
10028
+ pattern: /^<%[-_=]?|[-_]?%>$/,
10029
+ alias: 'punctuation'
10030
+ },
10031
+ comment: /^#[\s\S]*/,
10032
+ 'language-javascript': {
10033
+ pattern: /[\s\S]+/,
10034
+ inside: Prism.languages.javascript
10035
+ }
10036
+ };
10037
+ Prism.hooks.add('before-tokenize', function (env) {
10038
+ var ejsPattern = /<%(?!%)[\s\S]+?%>/g;
10039
+ Prism.languages['markup-templating'].buildPlaceholders(
10040
+ env,
10041
+ 'ejs',
10042
+ ejsPattern
10043
+ );
10044
+ });
10045
+ Prism.hooks.add('after-tokenize', function (env) {
10046
+ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs');
10047
+ });
10048
+ Prism.languages.eta = Prism.languages.ejs;
10049
+ })(Prism);
10050
+ }
10051
+ return ejs_1;
10225
10052
  }
10226
10053
 
10227
- var erlang_1 = erlang;
10228
- erlang.displayName = 'erlang';
10229
- erlang.aliases = [];
10230
- function erlang(Prism) {
10231
- Prism.languages.erlang = {
10232
- comment: /%.+/,
10233
- string: {
10234
- pattern: /"(?:\\.|[^\\"\r\n])*"/,
10235
- greedy: true
10236
- },
10237
- 'quoted-function': {
10238
- pattern: /'(?:\\.|[^\\'\r\n])+'(?=\()/,
10239
- alias: 'function'
10240
- },
10241
- 'quoted-atom': {
10242
- pattern: /'(?:\\.|[^\\'\r\n])+'/,
10243
- alias: 'atom'
10244
- },
10245
- boolean: /\b(?:false|true)\b/,
10246
- keyword: /\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,
10247
- number: [
10248
- /\$\\?./,
10249
- /\b\d+#[a-z0-9]+/i,
10250
- /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i
10251
- ],
10252
- function: /\b[a-z][\w@]*(?=\()/,
10253
- variable: {
10254
- // Look-behind is used to prevent wrong highlighting of atoms containing "@"
10255
- pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
10256
- lookbehind: true
10257
- },
10258
- operator: [
10259
- /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,
10260
- {
10261
- // We don't want to match <<
10262
- pattern: /(^|[^<])<(?!<)/,
10263
- lookbehind: true
10264
- },
10265
- {
10266
- // We don't want to match >>
10267
- pattern: /(^|[^>])>(?!>)/,
10268
- lookbehind: true
10269
- }
10270
- ],
10271
- atom: /\b[a-z][\w@]*/,
10272
- punctuation: /[()[\]{}:;,.#|]|<<|>>/
10273
- };
10274
- }
10054
+ var elixir_1;
10055
+ var hasRequiredElixir;
10275
10056
 
10276
- var lua_1 = lua;
10277
- lua.displayName = 'lua';
10278
- lua.aliases = [];
10279
- function lua(Prism) {
10280
- Prism.languages.lua = {
10281
- comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
10282
- // \z may be used to skip the following space
10283
- string: {
10284
- pattern:
10285
- /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
10286
- greedy: true
10287
- },
10288
- number:
10289
- /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,
10290
- keyword:
10291
- /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,
10292
- function: /(?!\d)\w+(?=\s*(?:[({]))/,
10293
- operator: [
10294
- /[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,
10295
- {
10296
- // Match ".." but don't break "..."
10297
- pattern: /(^|[^.])\.\.(?!\.)/,
10298
- lookbehind: true
10299
- }
10300
- ],
10301
- punctuation: /[\[\](){},;]|\.+|:+/
10302
- };
10057
+ function requireElixir () {
10058
+ if (hasRequiredElixir) return elixir_1;
10059
+ hasRequiredElixir = 1;
10060
+
10061
+ elixir_1 = elixir;
10062
+ elixir.displayName = 'elixir';
10063
+ elixir.aliases = [];
10064
+ function elixir(Prism) {
10065
+ Prism.languages.elixir = {
10066
+ doc: {
10067
+ pattern:
10068
+ /@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,
10069
+ inside: {
10070
+ attribute: /^@\w+/,
10071
+ string: /['"][\s\S]+/
10072
+ }
10073
+ },
10074
+ comment: {
10075
+ pattern: /#.*/,
10076
+ greedy: true
10077
+ },
10078
+ // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r<foo>
10079
+ regex: {
10080
+ pattern:
10081
+ /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,
10082
+ greedy: true
10083
+ },
10084
+ string: [
10085
+ {
10086
+ // ~s"""foo""" (multi-line), ~s'''foo''' (multi-line), ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo} (with interpolation care), ~s<foo>
10087
+ pattern:
10088
+ /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,
10089
+ greedy: true,
10090
+ inside: {
10091
+ // See interpolation below
10092
+ }
10093
+ },
10094
+ {
10095
+ pattern: /("""|''')[\s\S]*?\1/,
10096
+ greedy: true,
10097
+ inside: {
10098
+ // See interpolation below
10099
+ }
10100
+ },
10101
+ {
10102
+ // Multi-line strings are allowed
10103
+ pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
10104
+ greedy: true,
10105
+ inside: {
10106
+ // See interpolation below
10107
+ }
10108
+ }
10109
+ ],
10110
+ atom: {
10111
+ // Look-behind prevents bad highlighting of the :: operator
10112
+ pattern: /(^|[^:]):\w+/,
10113
+ lookbehind: true,
10114
+ alias: 'symbol'
10115
+ },
10116
+ module: {
10117
+ pattern: /\b[A-Z]\w*\b/,
10118
+ alias: 'class-name'
10119
+ },
10120
+ // Look-ahead prevents bad highlighting of the :: operator
10121
+ 'attr-name': /\b\w+\??:(?!:)/,
10122
+ argument: {
10123
+ // Look-behind prevents bad highlighting of the && operator
10124
+ pattern: /(^|[^&])&\d+/,
10125
+ lookbehind: true,
10126
+ alias: 'variable'
10127
+ },
10128
+ attribute: {
10129
+ pattern: /@\w+/,
10130
+ alias: 'variable'
10131
+ },
10132
+ function: /\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,
10133
+ number: /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,
10134
+ keyword:
10135
+ /\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,
10136
+ boolean: /\b(?:false|nil|true)\b/,
10137
+ operator: [
10138
+ /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,
10139
+ {
10140
+ // We don't want to match <<
10141
+ pattern: /([^<])<(?!<)/,
10142
+ lookbehind: true
10143
+ },
10144
+ {
10145
+ // We don't want to match >>
10146
+ pattern: /([^>])>(?!>)/,
10147
+ lookbehind: true
10148
+ }
10149
+ ],
10150
+ punctuation: /<<|>>|[.,%\[\]{}()]/
10151
+ };
10152
+ Prism.languages.elixir.string.forEach(function (o) {
10153
+ o.inside = {
10154
+ interpolation: {
10155
+ pattern: /#\{[^}]+\}/,
10156
+ inside: {
10157
+ delimiter: {
10158
+ pattern: /^#\{|\}$/,
10159
+ alias: 'punctuation'
10160
+ },
10161
+ rest: Prism.languages.elixir
10162
+ }
10163
+ }
10164
+ };
10165
+ });
10166
+ }
10167
+ return elixir_1;
10303
10168
  }
10304
10169
 
10305
- var refractorLua = lua_1;
10306
- var refractorMarkupTemplating = requireMarkupTemplating();
10307
- var etlua_1 = etlua;
10308
- etlua.displayName = 'etlua';
10309
- etlua.aliases = [];
10310
- function etlua(Prism) {
10311
- Prism.register(refractorLua);
10312
- Prism.register(refractorMarkupTemplating)
10313
- ;(function (Prism) {
10314
- Prism.languages.etlua = {
10315
- delimiter: {
10316
- pattern: /^<%[-=]?|-?%>$/,
10317
- alias: 'punctuation'
10318
- },
10319
- 'language-lua': {
10320
- pattern: /[\s\S]+/,
10321
- inside: Prism.languages.lua
10322
- }
10323
- };
10324
- Prism.hooks.add('before-tokenize', function (env) {
10325
- var pattern = /<%[\s\S]+?%>/g;
10326
- Prism.languages['markup-templating'].buildPlaceholders(
10327
- env,
10328
- 'etlua',
10329
- pattern
10330
- );
10331
- });
10332
- Prism.hooks.add('after-tokenize', function (env) {
10333
- Prism.languages['markup-templating'].tokenizePlaceholders(env, 'etlua');
10334
- });
10335
- })(Prism);
10170
+ var elm_1;
10171
+ var hasRequiredElm;
10172
+
10173
+ function requireElm () {
10174
+ if (hasRequiredElm) return elm_1;
10175
+ hasRequiredElm = 1;
10176
+
10177
+ elm_1 = elm;
10178
+ elm.displayName = 'elm';
10179
+ elm.aliases = [];
10180
+ function elm(Prism) {
10181
+ Prism.languages.elm = {
10182
+ comment: /--.*|\{-[\s\S]*?-\}/,
10183
+ char: {
10184
+ pattern:
10185
+ /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,
10186
+ greedy: true
10187
+ },
10188
+ string: [
10189
+ {
10190
+ // Multiline strings are wrapped in triple ". Quotes may appear unescaped.
10191
+ pattern: /"""[\s\S]*?"""/,
10192
+ greedy: true
10193
+ },
10194
+ {
10195
+ pattern: /"(?:[^\\"\r\n]|\\.)*"/,
10196
+ greedy: true
10197
+ }
10198
+ ],
10199
+ 'import-statement': {
10200
+ // The imported or hidden names are not included in this import
10201
+ // statement. This is because we want to highlight those exactly like
10202
+ // we do for the names in the program.
10203
+ pattern:
10204
+ /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,
10205
+ lookbehind: true,
10206
+ inside: {
10207
+ keyword: /\b(?:as|exposing|import)\b/
10208
+ }
10209
+ },
10210
+ keyword:
10211
+ /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,
10212
+ // These are builtin variables only. Constructors are highlighted later as a constant.
10213
+ builtin:
10214
+ /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,
10215
+ // decimal integers and floating point numbers | hexadecimal integers
10216
+ number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,
10217
+ // Most of this is needed because of the meaning of a single '.'.
10218
+ // If it stands alone freely, it is the function composition.
10219
+ // It may also be a separator between a module name and an identifier => no
10220
+ // operator. If it comes together with other special characters it is an
10221
+ // operator too.
10222
+ // Valid operator characters in 0.18: +-/*=.$<>:&|^?%#@~!
10223
+ // Ref: https://groups.google.com/forum/#!msg/elm-dev/0AHSnDdkSkQ/E0SVU70JEQAJ
10224
+ operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,
10225
+ // In Elm, nearly everything is a variable, do not highlight these.
10226
+ hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,
10227
+ constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,
10228
+ punctuation: /[{}[\]|(),.:]/
10229
+ };
10230
+ }
10231
+ return elm_1;
10336
10232
  }
10337
10233
 
10338
- var excelFormula_1 = excelFormula;
10339
- excelFormula.displayName = 'excelFormula';
10340
- excelFormula.aliases = [];
10341
- function excelFormula(Prism) {
10342
- Prism.languages['excel-formula'] = {
10343
- comment: {
10344
- pattern: /(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,
10345
- lookbehind: true,
10346
- greedy: true
10347
- },
10348
- string: {
10349
- pattern: /"(?:[^"]|"")*"(?!")/,
10350
- greedy: true
10351
- },
10352
- reference: {
10353
- // https://www.ablebits.com/office-addins-blog/2015/12/08/excel-reference-another-sheet-workbook/
10354
- // Sales!B2
10355
- // 'Winter sales'!B2
10356
- // [Sales.xlsx]Jan!B2:B5
10357
- // D:\Reports\[Sales.xlsx]Jan!B2:B5
10358
- // '[Sales.xlsx]Jan sales'!B2:B5
10359
- // 'D:\Reports\[Sales.xlsx]Jan sales'!B2:B5
10360
- pattern:
10361
- /(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,
10362
- greedy: true,
10363
- alias: 'string',
10364
- inside: {
10365
- operator: /!$/,
10366
- punctuation: /'/,
10367
- sheet: {
10368
- pattern: /[^[\]]+$/,
10369
- alias: 'function'
10370
- },
10371
- file: {
10372
- pattern: /\[[^[\]]+\]$/,
10373
- inside: {
10374
- punctuation: /[[\]]/
10375
- }
10376
- },
10377
- path: /[\s\S]+/
10378
- }
10379
- },
10380
- 'function-name': {
10381
- pattern: /\b[A-Z]\w*(?=\()/i,
10382
- alias: 'keyword'
10383
- },
10384
- range: {
10385
- pattern:
10386
- /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,
10387
- alias: 'property',
10388
- inside: {
10389
- operator: /:/,
10390
- cell: /\$?[A-Z]+\$?\d+/i,
10391
- column: /\$?[A-Z]+/i,
10392
- row: /\$?\d+/
10393
- }
10394
- },
10395
- cell: {
10396
- // Excel is case insensitive, so the string "foo1" could be either a variable or a cell.
10397
- // To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise.
10398
- pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,
10399
- alias: 'property'
10400
- },
10401
- number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
10402
- boolean: /\b(?:FALSE|TRUE)\b/i,
10403
- operator: /[-+*/^%=&,]|<[=>]?|>=?/,
10404
- punctuation: /[[\]();{}|]/
10405
- };
10406
- Prism.languages['xlsx'] = Prism.languages['xls'] =
10407
- Prism.languages['excel-formula'];
10234
+ var erb_1;
10235
+ var hasRequiredErb;
10236
+
10237
+ function requireErb () {
10238
+ if (hasRequiredErb) return erb_1;
10239
+ hasRequiredErb = 1;
10240
+ var refractorRuby = ruby_1;
10241
+ var refractorMarkupTemplating = requireMarkupTemplating();
10242
+ erb_1 = erb;
10243
+ erb.displayName = 'erb';
10244
+ erb.aliases = [];
10245
+ function erb(Prism) {
10246
+ Prism.register(refractorRuby);
10247
+ Prism.register(refractorMarkupTemplating)
10248
+ ;(function (Prism) {
10249
+ Prism.languages.erb = {
10250
+ delimiter: {
10251
+ pattern: /^(\s*)<%=?|%>(?=\s*$)/,
10252
+ lookbehind: true,
10253
+ alias: 'punctuation'
10254
+ },
10255
+ ruby: {
10256
+ pattern: /\s*\S[\s\S]*/,
10257
+ alias: 'language-ruby',
10258
+ inside: Prism.languages.ruby
10259
+ }
10260
+ };
10261
+ Prism.hooks.add('before-tokenize', function (env) {
10262
+ var erbPattern =
10263
+ /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g;
10264
+ Prism.languages['markup-templating'].buildPlaceholders(
10265
+ env,
10266
+ 'erb',
10267
+ erbPattern
10268
+ );
10269
+ });
10270
+ Prism.hooks.add('after-tokenize', function (env) {
10271
+ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'erb');
10272
+ });
10273
+ })(Prism);
10274
+ }
10275
+ return erb_1;
10408
10276
  }
10409
10277
 
10410
- var factor_1 = factor;
10411
- factor.displayName = 'factor';
10412
- factor.aliases = [];
10413
- function factor(Prism) {
10414
- (function (Prism) {
10415
- var comment_inside = {
10416
- function:
10417
- /\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/
10418
- };
10419
- var string_inside = {
10420
- number: /\\[^\s']|%\w/
10421
- };
10422
- var factor = {
10423
- comment: [
10424
- {
10425
- // ! single-line exclamation point comments with whitespace after/around the !
10426
- pattern: /(^|\s)(?:! .*|!$)/,
10427
- lookbehind: true,
10428
- inside: comment_inside
10429
- },
10430
- /* from basis/multiline: */
10431
- {
10432
- // /* comment */, /* comment*/
10433
- pattern: /(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,
10434
- lookbehind: true,
10435
- greedy: true,
10436
- inside: comment_inside
10437
- },
10438
- {
10439
- // ![[ comment ]] , ![===[ comment]===]
10440
- pattern: /(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10441
- lookbehind: true,
10442
- greedy: true,
10443
- inside: comment_inside
10444
- }
10445
- ],
10446
- number: [
10447
- {
10448
- // basic base 10 integers 9, -9
10449
- pattern: /(^|\s)[+-]?\d+(?=\s|$)/,
10450
- lookbehind: true
10451
- },
10452
- {
10453
- // base prefix integers 0b010 0o70 0xad 0d10 0XAD -0xa9
10454
- pattern: /(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,
10455
- lookbehind: true
10456
- },
10457
- {
10458
- // fractional ratios 1/5 -1/5 and the literal float approximations 1/5. -1/5.
10459
- pattern: /(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,
10460
- lookbehind: true
10461
- },
10462
- {
10463
- // positive mixed numbers 23+1/5 +23+1/5
10464
- pattern: /(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,
10465
- lookbehind: true
10466
- },
10467
- {
10468
- // negative mixed numbers -23-1/5
10469
- pattern: /(^|\s)-\d+-\d+\/\d+(?=\s|$)/,
10470
- lookbehind: true
10471
- },
10472
- {
10473
- // basic decimal floats -0.01 0. .0 .1 -.1 -1. -12.13 +12.13
10474
- // and scientific notation with base 10 exponents 3e4 3e-4 .3e-4
10475
- pattern:
10476
- /(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,
10477
- lookbehind: true
10478
- },
10479
- {
10480
- // NAN literal syntax NAN: 80000deadbeef, NAN: a
10481
- pattern: /(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,
10482
- lookbehind: true
10483
- },
10484
- {
10485
- /*
10486
- base prefix floats 0x1.0p3 (8.0) 0b1.010p2 (5.0) 0x1.p1 0b1.11111111p11111...
10487
- "The normalized hex form ±0x1.MMMMMMMMMMMMM[pP]±EEEE allows any floating-point number to be specified precisely.
10488
- The values of MMMMMMMMMMMMM and EEEE map directly to the mantissa and exponent fields of the binary IEEE 754 representation."
10489
- <https://docs.factorcode.org/content/article-syntax-floats.html>
10490
- */
10491
- pattern:
10492
- /(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,
10493
- lookbehind: true
10494
- }
10495
- ],
10496
- // R/ regexp?\/\\/
10497
- regexp: {
10498
- pattern:
10499
- /(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,
10500
- lookbehind: true,
10501
- alias: 'number',
10502
- inside: {
10503
- variable: /\\\S/,
10504
- keyword: /[+?*\[\]^$(){}.|]/,
10505
- operator: {
10506
- pattern: /(\/)[idmsr]+(?:-[idmsr]+)?/,
10507
- lookbehind: true
10508
- }
10509
- }
10510
- },
10511
- boolean: {
10512
- pattern: /(^|\s)[tf](?=\s|$)/,
10513
- lookbehind: true
10514
- },
10515
- // SBUF" asd", URL" ://...", P" /etc/"
10516
- 'custom-string': {
10517
- pattern: /(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,
10518
- lookbehind: true,
10519
- greedy: true,
10520
- alias: 'string',
10521
- inside: {
10522
- number: /\\\S|%\w|\//
10523
- }
10524
- },
10525
- 'multiline-string': [
10526
- {
10527
- // STRING: name \n content \n ; -> CONSTANT: name "content" (symbol)
10528
- pattern: /(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,
10529
- lookbehind: true,
10530
- greedy: true,
10531
- alias: 'string',
10532
- inside: {
10533
- number: string_inside.number,
10534
- // trailing semicolon on its own line
10535
- 'semicolon-or-setlocal': {
10536
- pattern: /([\r\n][ \t]*);(?=\s|$)/,
10537
- lookbehind: true,
10538
- alias: 'function'
10539
- }
10540
- }
10541
- },
10542
- {
10543
- // HEREDOC: marker \n content \n marker ; -> "content" (immediate)
10544
- pattern: /(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,
10545
- lookbehind: true,
10546
- greedy: true,
10547
- alias: 'string',
10548
- inside: string_inside
10549
- },
10550
- {
10551
- // [[ string ]], [==[ string]==]
10552
- pattern: /(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10553
- lookbehind: true,
10554
- greedy: true,
10555
- alias: 'string',
10556
- inside: string_inside
10557
- }
10558
- ],
10559
- 'special-using': {
10560
- pattern: /(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,
10561
- lookbehind: true,
10562
- alias: 'function',
10563
- inside: {
10564
- // this is essentially a regex for vocab names, which i don't want to specify
10565
- // but the USING: gets picked up as a vocab name
10566
- string: {
10567
- pattern: /(\s)[^:\s]+/,
10568
- lookbehind: true
10569
- }
10570
- }
10571
- },
10572
- /* this description of stack effect literal syntax is not complete and not as specific as theoretically possible
10573
- trying to do better is more work and regex-computation-time than it's worth though.
10574
- - we'd like to have the "delimiter" parts of the stack effect [ (, --, and ) ] be a different (less-important or comment-like) colour to the stack effect contents
10575
- - we'd like if nested stack effects were treated as such rather than just appearing flat (with `inside`)
10576
- - we'd like if the following variable name conventions were recognised specifically:
10577
- special row variables = ..a b..
10578
- type and stack effect annotations end with a colon = ( quot: ( a: ( -- ) -- b ) -- x ), ( x: number -- )
10579
- word throws unconditional error = *
10580
- any other word-like variable name = a ? q' etc
10581
- https://docs.factorcode.org/content/article-effects.html
10582
- these are pretty complicated to highlight properly without a real parser, and therefore out of scope
10583
- the old pattern, which may be later useful, was: (^|\s)(?:call|execute|eval)?\((?:\s+[^"\r\n\t ]\S*)*?\s+--(?:\s+[^"\n\t ]\S*)*?\s+\)(?=\s|$)
10584
- */
10585
- // current solution is not great
10586
- 'stack-effect-delimiter': [
10587
- {
10588
- // opening parenthesis
10589
- pattern: /(^|\s)(?:call|eval|execute)?\((?=\s)/,
10590
- lookbehind: true,
10591
- alias: 'operator'
10592
- },
10593
- {
10594
- // middle --
10595
- pattern: /(\s)--(?=\s)/,
10596
- lookbehind: true,
10597
- alias: 'operator'
10598
- },
10599
- {
10600
- // closing parenthesis
10601
- pattern: /(\s)\)(?=\s|$)/,
10602
- lookbehind: true,
10603
- alias: 'operator'
10604
- }
10605
- ],
10606
- combinators: {
10607
- pattern: null,
10608
- lookbehind: true,
10609
- alias: 'keyword'
10610
- },
10611
- 'kernel-builtin': {
10612
- pattern: null,
10613
- lookbehind: true,
10614
- alias: 'variable'
10615
- },
10616
- 'sequences-builtin': {
10617
- pattern: null,
10618
- lookbehind: true,
10619
- alias: 'variable'
10620
- },
10621
- 'math-builtin': {
10622
- pattern: null,
10623
- lookbehind: true,
10624
- alias: 'variable'
10625
- },
10626
- 'constructor-word': {
10627
- // <array> but not <=>
10628
- pattern: /(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,
10629
- lookbehind: true,
10630
- alias: 'keyword'
10631
- },
10632
- 'other-builtin-syntax': {
10633
- pattern: null,
10634
- lookbehind: true,
10635
- alias: 'operator'
10636
- },
10637
- /*
10638
- full list of supported word naming conventions: (the convention appears outside of the [brackets])
10639
- set-[x]
10640
- change-[x]
10641
- with-[x]
10642
- new-[x]
10643
- >[string]
10644
- [base]>
10645
- [string]>[number]
10646
- +[symbol]+
10647
- [boolean-word]?
10648
- ?[of]
10649
- [slot-reader]>>
10650
- >>[slot-setter]
10651
- [slot-writer]<<
10652
- ([implementation-detail])
10653
- [mutater]!
10654
- [variant]*
10655
- [prettyprint].
10656
- $[help-markup]
10657
- <constructors>, SYNTAX:, etc are supported by their own patterns.
10658
- `with` and `new` from `kernel` are their own builtins.
10659
- see <https://docs.factorcode.org/content/article-conventions.html>
10660
- */
10661
- 'conventionally-named-word': {
10662
- pattern:
10663
- /(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,
10664
- lookbehind: true,
10665
- alias: 'keyword'
10666
- },
10667
- 'colon-syntax': {
10668
- pattern: /(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,
10669
- lookbehind: true,
10670
- greedy: true,
10671
- alias: 'function'
10672
- },
10673
- 'semicolon-or-setlocal': {
10674
- pattern: /(\s)(?:;|:>)(?=\s|$)/,
10675
- lookbehind: true,
10676
- alias: 'function'
10677
- },
10678
- // do not highlight leading } or trailing X{ at the begin/end of the file as it's invalid syntax
10679
- 'curly-brace-literal-delimiter': [
10680
- {
10681
- // opening
10682
- pattern: /(^|\s)[a-z]*\{(?=\s)/i,
10683
- lookbehind: true,
10684
- alias: 'operator'
10685
- },
10686
- {
10687
- // closing
10688
- pattern: /(\s)\}(?=\s|$)/,
10689
- lookbehind: true,
10690
- alias: 'operator'
10691
- }
10692
- ],
10693
- // do not highlight leading ] or trailing [ at the begin/end of the file as it's invalid syntax
10694
- 'quotation-delimiter': [
10695
- {
10696
- // opening
10697
- pattern: /(^|\s)\[(?=\s)/,
10698
- lookbehind: true,
10699
- alias: 'operator'
10700
- },
10701
- {
10702
- // closing
10703
- pattern: /(\s)\](?=\s|$)/,
10704
- lookbehind: true,
10705
- alias: 'operator'
10706
- }
10707
- ],
10708
- 'normal-word': {
10709
- pattern: /(^|\s)[^"\s]\S*(?=\s|$)/,
10710
- lookbehind: true
10711
- },
10712
- /*
10713
- basic first-class string "a"
10714
- with escaped double-quote "a\""
10715
- escaped backslash "\\"
10716
- and general escapes since Factor has so many "\N"
10717
- syntax that works in the reference implementation that isn't fully
10718
- supported because it's an implementation detail:
10719
- "string 1""string 2" -> 2 strings (works anyway)
10720
- "string"5 -> string, 5
10721
- "string"[ ] -> string, quotation
10722
- { "a"} -> array<string>
10723
- the rest of those examples all properly recognise the string, but not
10724
- the other object (number, quotation, etc)
10725
- this is fine for a regex-only implementation.
10726
- */
10727
- string: {
10728
- pattern: /"(?:\\\S|[^"\\])*"/,
10729
- greedy: true,
10730
- inside: string_inside
10731
- }
10732
- };
10733
- var escape = function (str) {
10734
- return (str + '').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1')
10735
- };
10736
- var arrToWordsRegExp = function (arr) {
10737
- return new RegExp('(^|\\s)(?:' + arr.map(escape).join('|') + ')(?=\\s|$)')
10738
- };
10739
- var builtins = {
10740
- 'kernel-builtin': [
10741
- 'or',
10742
- '2nipd',
10743
- '4drop',
10744
- 'tuck',
10745
- 'wrapper',
10746
- 'nip',
10747
- 'wrapper?',
10748
- 'callstack>array',
10749
- 'die',
10750
- 'dupd',
10751
- 'callstack',
10752
- 'callstack?',
10753
- '3dup',
10754
- 'hashcode',
10755
- 'pick',
10756
- '4nip',
10757
- 'build',
10758
- '>boolean',
10759
- 'nipd',
10760
- 'clone',
10761
- '5nip',
10762
- 'eq?',
10763
- '?',
10764
- '=',
10765
- 'swapd',
10766
- '2over',
10767
- 'clear',
10768
- '2dup',
10769
- 'get-retainstack',
10770
- 'not',
10771
- 'tuple?',
10772
- 'dup',
10773
- '3nipd',
10774
- 'call',
10775
- '-rotd',
10776
- 'object',
10777
- 'drop',
10778
- 'assert=',
10779
- 'assert?',
10780
- '-rot',
10781
- 'execute',
10782
- 'boa',
10783
- 'get-callstack',
10784
- 'curried?',
10785
- '3drop',
10786
- 'pickd',
10787
- 'overd',
10788
- 'over',
10789
- 'roll',
10790
- '3nip',
10791
- 'swap',
10792
- 'and',
10793
- '2nip',
10794
- 'rotd',
10795
- 'throw',
10796
- '(clone)',
10797
- 'hashcode*',
10798
- 'spin',
10799
- 'reach',
10800
- '4dup',
10801
- 'equal?',
10802
- 'get-datastack',
10803
- 'assert',
10804
- '2drop',
10805
- '<wrapper>',
10806
- 'boolean?',
10807
- 'identity-hashcode',
10808
- 'identity-tuple?',
10809
- 'null',
10810
- 'composed?',
10811
- 'new',
10812
- '5drop',
10813
- 'rot',
10814
- '-roll',
10815
- 'xor',
10816
- 'identity-tuple',
10817
- 'boolean'
10818
- ],
10819
- 'other-builtin-syntax': [
10820
- // syntax
10821
- '=======',
10822
- 'recursive',
10823
- 'flushable',
10824
- '>>',
10825
- '<<<<<<',
10826
- 'M\\',
10827
- 'B',
10828
- 'PRIVATE>',
10829
- '\\',
10830
- '======',
10831
- 'final',
10832
- 'inline',
10833
- 'delimiter',
10834
- 'deprecated',
10835
- '<PRIVATE',
10836
- '>>>>>>',
10837
- '<<<<<<<',
10838
- 'parse-complex',
10839
- 'malformed-complex',
10840
- 'read-only',
10841
- '>>>>>>>',
10842
- 'call-next-method',
10843
- '<<',
10844
- 'foldable', // literals
10845
- '$',
10846
- '$[',
10847
- '${'
10848
- ],
10849
- 'sequences-builtin': [
10850
- 'member-eq?',
10851
- 'mismatch',
10852
- 'append',
10853
- 'assert-sequence=',
10854
- 'longer',
10855
- 'repetition',
10856
- 'clone-like',
10857
- '3sequence',
10858
- 'assert-sequence?',
10859
- 'last-index-from',
10860
- 'reversed',
10861
- 'index-from',
10862
- 'cut*',
10863
- 'pad-tail',
10864
- 'join-as',
10865
- 'remove-eq!',
10866
- 'concat-as',
10867
- 'but-last',
10868
- 'snip',
10869
- 'nths',
10870
- 'nth',
10871
- 'sequence',
10872
- 'longest',
10873
- 'slice?',
10874
- '<slice>',
10875
- 'remove-nth',
10876
- 'tail-slice',
10877
- 'empty?',
10878
- 'tail*',
10879
- 'member?',
10880
- 'virtual-sequence?',
10881
- 'set-length',
10882
- 'drop-prefix',
10883
- 'iota',
10884
- 'unclip',
10885
- 'bounds-error?',
10886
- 'unclip-last-slice',
10887
- 'non-negative-integer-expected',
10888
- 'non-negative-integer-expected?',
10889
- 'midpoint@',
10890
- 'longer?',
10891
- '?set-nth',
10892
- '?first',
10893
- 'rest-slice',
10894
- 'prepend-as',
10895
- 'prepend',
10896
- 'fourth',
10897
- 'sift',
10898
- 'subseq-start',
10899
- 'new-sequence',
10900
- '?last',
10901
- 'like',
10902
- 'first4',
10903
- '1sequence',
10904
- 'reverse',
10905
- 'slice',
10906
- 'virtual@',
10907
- 'repetition?',
10908
- 'set-last',
10909
- 'index',
10910
- '4sequence',
10911
- 'max-length',
10912
- 'set-second',
10913
- 'immutable-sequence',
10914
- 'first2',
10915
- 'first3',
10916
- 'supremum',
10917
- 'unclip-slice',
10918
- 'suffix!',
10919
- 'insert-nth',
10920
- 'tail',
10921
- '3append',
10922
- 'short',
10923
- 'suffix',
10924
- 'concat',
10925
- 'flip',
10926
- 'immutable?',
10927
- 'reverse!',
10928
- '2sequence',
10929
- 'sum',
10930
- 'delete-all',
10931
- 'indices',
10932
- 'snip-slice',
10933
- '<iota>',
10934
- 'check-slice',
10935
- 'sequence?',
10936
- 'head',
10937
- 'append-as',
10938
- 'halves',
10939
- 'sequence=',
10940
- 'collapse-slice',
10941
- '?second',
10942
- 'slice-error?',
10943
- 'product',
10944
- 'bounds-check?',
10945
- 'bounds-check',
10946
- 'immutable',
10947
- 'virtual-exemplar',
10948
- 'harvest',
10949
- 'remove',
10950
- 'pad-head',
10951
- 'last',
10952
- 'set-fourth',
10953
- 'cartesian-product',
10954
- 'remove-eq',
10955
- 'shorten',
10956
- 'shorter',
10957
- 'reversed?',
10958
- 'shorter?',
10959
- 'shortest',
10960
- 'head-slice',
10961
- 'pop*',
10962
- 'tail-slice*',
10963
- 'but-last-slice',
10964
- 'iota?',
10965
- 'append!',
10966
- 'cut-slice',
10967
- 'new-resizable',
10968
- 'head-slice*',
10969
- 'sequence-hashcode',
10970
- 'pop',
10971
- 'set-nth',
10972
- '?nth',
10973
- 'second',
10974
- 'join',
10975
- 'immutable-sequence?',
10976
- '<reversed>',
10977
- '3append-as',
10978
- 'virtual-sequence',
10979
- 'subseq?',
10980
- 'remove-nth!',
10981
- 'length',
10982
- 'last-index',
10983
- 'lengthen',
10984
- 'assert-sequence',
10985
- 'copy',
10986
- 'move',
10987
- 'third',
10988
- 'first',
10989
- 'tail?',
10990
- 'set-first',
10991
- 'prefix',
10992
- 'bounds-error',
10993
- '<repetition>',
10994
- 'exchange',
10995
- 'surround',
10996
- 'cut',
10997
- 'min-length',
10998
- 'set-third',
10999
- 'push-all',
11000
- 'head?',
11001
- 'subseq-start-from',
11002
- 'delete-slice',
11003
- 'rest',
11004
- 'sum-lengths',
11005
- 'head*',
11006
- 'infimum',
11007
- 'remove!',
11008
- 'glue',
11009
- 'slice-error',
11010
- 'subseq',
11011
- 'push',
11012
- 'replace-slice',
11013
- 'subseq-as',
11014
- 'unclip-last'
11015
- ],
11016
- 'math-builtin': [
11017
- 'number=',
11018
- 'next-power-of-2',
11019
- '?1+',
11020
- 'fp-special?',
11021
- 'imaginary-part',
11022
- 'float>bits',
11023
- 'number?',
11024
- 'fp-infinity?',
11025
- 'bignum?',
11026
- 'fp-snan?',
11027
- 'denominator',
11028
- 'gcd',
11029
- '*',
11030
- '+',
11031
- 'fp-bitwise=',
11032
- '-',
11033
- 'u>=',
11034
- '/',
11035
- '>=',
11036
- 'bitand',
11037
- 'power-of-2?',
11038
- 'log2-expects-positive',
11039
- 'neg?',
11040
- '<',
11041
- 'log2',
11042
- '>',
11043
- 'integer?',
11044
- 'number',
11045
- 'bits>double',
11046
- '2/',
11047
- 'zero?',
11048
- 'bits>float',
11049
- 'float?',
11050
- 'shift',
11051
- 'ratio?',
11052
- 'rect>',
11053
- 'even?',
11054
- 'ratio',
11055
- 'fp-sign',
11056
- 'bitnot',
11057
- '>fixnum',
11058
- 'complex?',
11059
- '/i',
11060
- 'integer>fixnum',
11061
- '/f',
11062
- 'sgn',
11063
- '>bignum',
11064
- 'next-float',
11065
- 'u<',
11066
- 'u>',
11067
- 'mod',
11068
- 'recip',
11069
- 'rational',
11070
- '>float',
11071
- '2^',
11072
- 'integer',
11073
- 'fixnum?',
11074
- 'neg',
11075
- 'fixnum',
11076
- 'sq',
11077
- 'bignum',
11078
- '>rect',
11079
- 'bit?',
11080
- 'fp-qnan?',
11081
- 'simple-gcd',
11082
- 'complex',
11083
- '<fp-nan>',
11084
- 'real',
11085
- '>fraction',
11086
- 'double>bits',
11087
- 'bitor',
11088
- 'rem',
11089
- 'fp-nan-payload',
11090
- 'real-part',
11091
- 'log2-expects-positive?',
11092
- 'prev-float',
11093
- 'align',
11094
- 'unordered?',
11095
- 'float',
11096
- 'fp-nan?',
11097
- 'abs',
11098
- 'bitxor',
11099
- 'integer>fixnum-strict',
11100
- 'u<=',
11101
- 'odd?',
11102
- '<=',
11103
- '/mod',
11104
- '>integer',
11105
- 'real?',
11106
- 'rational?',
11107
- 'numerator'
11108
- ] // that's all for now
11109
- };
11110
- Object.keys(builtins).forEach(function (k) {
11111
- factor[k].pattern = arrToWordsRegExp(builtins[k]);
11112
- });
11113
- var combinators = [
11114
- // kernel
11115
- '2bi',
11116
- 'while',
11117
- '2tri',
11118
- 'bi*',
11119
- '4dip',
11120
- 'both?',
11121
- 'same?',
11122
- 'tri@',
11123
- 'curry',
11124
- 'prepose',
11125
- '3bi',
11126
- '?if',
11127
- 'tri*',
11128
- '2keep',
11129
- '3keep',
11130
- 'curried',
11131
- '2keepd',
11132
- 'when',
11133
- '2bi*',
11134
- '2tri*',
11135
- '4keep',
11136
- 'bi@',
11137
- 'keepdd',
11138
- 'do',
11139
- 'unless*',
11140
- 'tri-curry',
11141
- 'if*',
11142
- 'loop',
11143
- 'bi-curry*',
11144
- 'when*',
11145
- '2bi@',
11146
- '2tri@',
11147
- 'with',
11148
- '2with',
11149
- 'either?',
11150
- 'bi',
11151
- 'until',
11152
- '3dip',
11153
- '3curry',
11154
- 'tri-curry*',
11155
- 'tri-curry@',
11156
- 'bi-curry',
11157
- 'keepd',
11158
- 'compose',
11159
- '2dip',
11160
- 'if',
11161
- '3tri',
11162
- 'unless',
11163
- 'tuple',
11164
- 'keep',
11165
- '2curry',
11166
- 'tri',
11167
- 'most',
11168
- 'while*',
11169
- 'dip',
11170
- 'composed',
11171
- 'bi-curry@', // sequences
11172
- 'find-last-from',
11173
- 'trim-head-slice',
11174
- 'map-as',
11175
- 'each-from',
11176
- 'none?',
11177
- 'trim-tail',
11178
- 'partition',
11179
- 'if-empty',
11180
- 'accumulate*',
11181
- 'reject!',
11182
- 'find-from',
11183
- 'accumulate-as',
11184
- 'collector-for-as',
11185
- 'reject',
11186
- 'map',
11187
- 'map-sum',
11188
- 'accumulate!',
11189
- '2each-from',
11190
- 'follow',
11191
- 'supremum-by',
11192
- 'map!',
11193
- 'unless-empty',
11194
- 'collector',
11195
- 'padding',
11196
- 'reduce-index',
11197
- 'replicate-as',
11198
- 'infimum-by',
11199
- 'trim-tail-slice',
11200
- 'count',
11201
- 'find-index',
11202
- 'filter',
11203
- 'accumulate*!',
11204
- 'reject-as',
11205
- 'map-integers',
11206
- 'map-find',
11207
- 'reduce',
11208
- 'selector',
11209
- 'interleave',
11210
- '2map',
11211
- 'filter-as',
11212
- 'binary-reduce',
11213
- 'map-index-as',
11214
- 'find',
11215
- 'produce',
11216
- 'filter!',
11217
- 'replicate',
11218
- 'cartesian-map',
11219
- 'cartesian-each',
11220
- 'find-index-from',
11221
- 'map-find-last',
11222
- '3map-as',
11223
- '3map',
11224
- 'find-last',
11225
- 'selector-as',
11226
- '2map-as',
11227
- '2map-reduce',
11228
- 'accumulate',
11229
- 'each',
11230
- 'each-index',
11231
- 'accumulate*-as',
11232
- 'when-empty',
11233
- 'all?',
11234
- 'collector-as',
11235
- 'push-either',
11236
- 'new-like',
11237
- 'collector-for',
11238
- '2selector',
11239
- 'push-if',
11240
- '2all?',
11241
- 'map-reduce',
11242
- '3each',
11243
- 'any?',
11244
- 'trim-slice',
11245
- '2reduce',
11246
- 'change-nth',
11247
- 'produce-as',
11248
- '2each',
11249
- 'trim',
11250
- 'trim-head',
11251
- 'cartesian-find',
11252
- 'map-index', // math
11253
- 'if-zero',
11254
- 'each-integer',
11255
- 'unless-zero',
11256
- '(find-integer)',
11257
- 'when-zero',
11258
- 'find-last-integer',
11259
- '(all-integers?)',
11260
- 'times',
11261
- '(each-integer)',
11262
- 'find-integer',
11263
- 'all-integers?', // math.combinators
11264
- 'unless-negative',
11265
- 'if-positive',
11266
- 'when-positive',
11267
- 'when-negative',
11268
- 'unless-positive',
11269
- 'if-negative', // combinators
11270
- 'case',
11271
- '2cleave',
11272
- 'cond>quot',
11273
- 'case>quot',
11274
- '3cleave',
11275
- 'wrong-values',
11276
- 'to-fixed-point',
11277
- 'alist>quot',
11278
- 'cond',
11279
- 'cleave',
11280
- 'call-effect',
11281
- 'recursive-hashcode',
11282
- 'spread',
11283
- 'deep-spread>quot', // combinators.short-circuit
11284
- '2||',
11285
- '0||',
11286
- 'n||',
11287
- '0&&',
11288
- '2&&',
11289
- '3||',
11290
- '1||',
11291
- '1&&',
11292
- 'n&&',
11293
- '3&&', // combinators.smart
11294
- 'smart-unless*',
11295
- 'keep-inputs',
11296
- 'reduce-outputs',
11297
- 'smart-when*',
11298
- 'cleave>array',
11299
- 'smart-with',
11300
- 'smart-apply',
11301
- 'smart-if',
11302
- 'inputs/outputs',
11303
- 'output>sequence-n',
11304
- 'map-outputs',
11305
- 'map-reduce-outputs',
11306
- 'dropping',
11307
- 'output>array',
11308
- 'smart-map-reduce',
11309
- 'smart-2map-reduce',
11310
- 'output>array-n',
11311
- 'nullary',
11312
- 'input<sequence',
11313
- 'append-outputs',
11314
- 'drop-inputs',
11315
- 'inputs',
11316
- 'smart-2reduce',
11317
- 'drop-outputs',
11318
- 'smart-reduce',
11319
- 'preserving',
11320
- 'smart-when',
11321
- 'outputs',
11322
- 'append-outputs-as',
11323
- 'smart-unless',
11324
- 'smart-if*',
11325
- 'sum-outputs',
11326
- 'input<sequence-unsafe',
11327
- 'output>sequence' // tafn
11328
- ];
11329
- factor.combinators.pattern = arrToWordsRegExp(combinators);
11330
- Prism.languages.factor = factor;
11331
- })(Prism);
10278
+ var erlang_1;
10279
+ var hasRequiredErlang;
10280
+
10281
+ function requireErlang () {
10282
+ if (hasRequiredErlang) return erlang_1;
10283
+ hasRequiredErlang = 1;
10284
+
10285
+ erlang_1 = erlang;
10286
+ erlang.displayName = 'erlang';
10287
+ erlang.aliases = [];
10288
+ function erlang(Prism) {
10289
+ Prism.languages.erlang = {
10290
+ comment: /%.+/,
10291
+ string: {
10292
+ pattern: /"(?:\\.|[^\\"\r\n])*"/,
10293
+ greedy: true
10294
+ },
10295
+ 'quoted-function': {
10296
+ pattern: /'(?:\\.|[^\\'\r\n])+'(?=\()/,
10297
+ alias: 'function'
10298
+ },
10299
+ 'quoted-atom': {
10300
+ pattern: /'(?:\\.|[^\\'\r\n])+'/,
10301
+ alias: 'atom'
10302
+ },
10303
+ boolean: /\b(?:false|true)\b/,
10304
+ keyword: /\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,
10305
+ number: [
10306
+ /\$\\?./,
10307
+ /\b\d+#[a-z0-9]+/i,
10308
+ /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i
10309
+ ],
10310
+ function: /\b[a-z][\w@]*(?=\()/,
10311
+ variable: {
10312
+ // Look-behind is used to prevent wrong highlighting of atoms containing "@"
10313
+ pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
10314
+ lookbehind: true
10315
+ },
10316
+ operator: [
10317
+ /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,
10318
+ {
10319
+ // We don't want to match <<
10320
+ pattern: /(^|[^<])<(?!<)/,
10321
+ lookbehind: true
10322
+ },
10323
+ {
10324
+ // We don't want to match >>
10325
+ pattern: /(^|[^>])>(?!>)/,
10326
+ lookbehind: true
10327
+ }
10328
+ ],
10329
+ atom: /\b[a-z][\w@]*/,
10330
+ punctuation: /[()[\]{}:;,.#|]|<<|>>/
10331
+ };
10332
+ }
10333
+ return erlang_1;
10334
+ }
10335
+
10336
+ var lua_1;
10337
+ var hasRequiredLua;
10338
+
10339
+ function requireLua () {
10340
+ if (hasRequiredLua) return lua_1;
10341
+ hasRequiredLua = 1;
10342
+
10343
+ lua_1 = lua;
10344
+ lua.displayName = 'lua';
10345
+ lua.aliases = [];
10346
+ function lua(Prism) {
10347
+ Prism.languages.lua = {
10348
+ comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
10349
+ // \z may be used to skip the following space
10350
+ string: {
10351
+ pattern:
10352
+ /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
10353
+ greedy: true
10354
+ },
10355
+ number:
10356
+ /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,
10357
+ keyword:
10358
+ /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,
10359
+ function: /(?!\d)\w+(?=\s*(?:[({]))/,
10360
+ operator: [
10361
+ /[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,
10362
+ {
10363
+ // Match ".." but don't break "..."
10364
+ pattern: /(^|[^.])\.\.(?!\.)/,
10365
+ lookbehind: true
10366
+ }
10367
+ ],
10368
+ punctuation: /[\[\](){},;]|\.+|:+/
10369
+ };
10370
+ }
10371
+ return lua_1;
10372
+ }
10373
+
10374
+ var etlua_1;
10375
+ var hasRequiredEtlua;
10376
+
10377
+ function requireEtlua () {
10378
+ if (hasRequiredEtlua) return etlua_1;
10379
+ hasRequiredEtlua = 1;
10380
+ var refractorLua = requireLua();
10381
+ var refractorMarkupTemplating = requireMarkupTemplating();
10382
+ etlua_1 = etlua;
10383
+ etlua.displayName = 'etlua';
10384
+ etlua.aliases = [];
10385
+ function etlua(Prism) {
10386
+ Prism.register(refractorLua);
10387
+ Prism.register(refractorMarkupTemplating)
10388
+ ;(function (Prism) {
10389
+ Prism.languages.etlua = {
10390
+ delimiter: {
10391
+ pattern: /^<%[-=]?|-?%>$/,
10392
+ alias: 'punctuation'
10393
+ },
10394
+ 'language-lua': {
10395
+ pattern: /[\s\S]+/,
10396
+ inside: Prism.languages.lua
10397
+ }
10398
+ };
10399
+ Prism.hooks.add('before-tokenize', function (env) {
10400
+ var pattern = /<%[\s\S]+?%>/g;
10401
+ Prism.languages['markup-templating'].buildPlaceholders(
10402
+ env,
10403
+ 'etlua',
10404
+ pattern
10405
+ );
10406
+ });
10407
+ Prism.hooks.add('after-tokenize', function (env) {
10408
+ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'etlua');
10409
+ });
10410
+ })(Prism);
10411
+ }
10412
+ return etlua_1;
10413
+ }
10414
+
10415
+ var excelFormula_1;
10416
+ var hasRequiredExcelFormula;
10417
+
10418
+ function requireExcelFormula () {
10419
+ if (hasRequiredExcelFormula) return excelFormula_1;
10420
+ hasRequiredExcelFormula = 1;
10421
+
10422
+ excelFormula_1 = excelFormula;
10423
+ excelFormula.displayName = 'excelFormula';
10424
+ excelFormula.aliases = [];
10425
+ function excelFormula(Prism) {
10426
+ Prism.languages['excel-formula'] = {
10427
+ comment: {
10428
+ pattern: /(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,
10429
+ lookbehind: true,
10430
+ greedy: true
10431
+ },
10432
+ string: {
10433
+ pattern: /"(?:[^"]|"")*"(?!")/,
10434
+ greedy: true
10435
+ },
10436
+ reference: {
10437
+ // https://www.ablebits.com/office-addins-blog/2015/12/08/excel-reference-another-sheet-workbook/
10438
+ // Sales!B2
10439
+ // 'Winter sales'!B2
10440
+ // [Sales.xlsx]Jan!B2:B5
10441
+ // D:\Reports\[Sales.xlsx]Jan!B2:B5
10442
+ // '[Sales.xlsx]Jan sales'!B2:B5
10443
+ // 'D:\Reports\[Sales.xlsx]Jan sales'!B2:B5
10444
+ pattern:
10445
+ /(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,
10446
+ greedy: true,
10447
+ alias: 'string',
10448
+ inside: {
10449
+ operator: /!$/,
10450
+ punctuation: /'/,
10451
+ sheet: {
10452
+ pattern: /[^[\]]+$/,
10453
+ alias: 'function'
10454
+ },
10455
+ file: {
10456
+ pattern: /\[[^[\]]+\]$/,
10457
+ inside: {
10458
+ punctuation: /[[\]]/
10459
+ }
10460
+ },
10461
+ path: /[\s\S]+/
10462
+ }
10463
+ },
10464
+ 'function-name': {
10465
+ pattern: /\b[A-Z]\w*(?=\()/i,
10466
+ alias: 'keyword'
10467
+ },
10468
+ range: {
10469
+ pattern:
10470
+ /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,
10471
+ alias: 'property',
10472
+ inside: {
10473
+ operator: /:/,
10474
+ cell: /\$?[A-Z]+\$?\d+/i,
10475
+ column: /\$?[A-Z]+/i,
10476
+ row: /\$?\d+/
10477
+ }
10478
+ },
10479
+ cell: {
10480
+ // Excel is case insensitive, so the string "foo1" could be either a variable or a cell.
10481
+ // To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise.
10482
+ pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,
10483
+ alias: 'property'
10484
+ },
10485
+ number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
10486
+ boolean: /\b(?:FALSE|TRUE)\b/i,
10487
+ operator: /[-+*/^%=&,]|<[=>]?|>=?/,
10488
+ punctuation: /[[\]();{}|]/
10489
+ };
10490
+ Prism.languages['xlsx'] = Prism.languages['xls'] =
10491
+ Prism.languages['excel-formula'];
10492
+ }
10493
+ return excelFormula_1;
10494
+ }
10495
+
10496
+ var factor_1;
10497
+ var hasRequiredFactor;
10498
+
10499
+ function requireFactor () {
10500
+ if (hasRequiredFactor) return factor_1;
10501
+ hasRequiredFactor = 1;
10502
+
10503
+ factor_1 = factor;
10504
+ factor.displayName = 'factor';
10505
+ factor.aliases = [];
10506
+ function factor(Prism) {
10507
+ (function (Prism) {
10508
+ var comment_inside = {
10509
+ function:
10510
+ /\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/
10511
+ };
10512
+ var string_inside = {
10513
+ number: /\\[^\s']|%\w/
10514
+ };
10515
+ var factor = {
10516
+ comment: [
10517
+ {
10518
+ // ! single-line exclamation point comments with whitespace after/around the !
10519
+ pattern: /(^|\s)(?:! .*|!$)/,
10520
+ lookbehind: true,
10521
+ inside: comment_inside
10522
+ },
10523
+ /* from basis/multiline: */
10524
+ {
10525
+ // /* comment */, /* comment*/
10526
+ pattern: /(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,
10527
+ lookbehind: true,
10528
+ greedy: true,
10529
+ inside: comment_inside
10530
+ },
10531
+ {
10532
+ // ![[ comment ]] , ![===[ comment]===]
10533
+ pattern: /(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10534
+ lookbehind: true,
10535
+ greedy: true,
10536
+ inside: comment_inside
10537
+ }
10538
+ ],
10539
+ number: [
10540
+ {
10541
+ // basic base 10 integers 9, -9
10542
+ pattern: /(^|\s)[+-]?\d+(?=\s|$)/,
10543
+ lookbehind: true
10544
+ },
10545
+ {
10546
+ // base prefix integers 0b010 0o70 0xad 0d10 0XAD -0xa9
10547
+ pattern: /(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,
10548
+ lookbehind: true
10549
+ },
10550
+ {
10551
+ // fractional ratios 1/5 -1/5 and the literal float approximations 1/5. -1/5.
10552
+ pattern: /(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,
10553
+ lookbehind: true
10554
+ },
10555
+ {
10556
+ // positive mixed numbers 23+1/5 +23+1/5
10557
+ pattern: /(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,
10558
+ lookbehind: true
10559
+ },
10560
+ {
10561
+ // negative mixed numbers -23-1/5
10562
+ pattern: /(^|\s)-\d+-\d+\/\d+(?=\s|$)/,
10563
+ lookbehind: true
10564
+ },
10565
+ {
10566
+ // basic decimal floats -0.01 0. .0 .1 -.1 -1. -12.13 +12.13
10567
+ // and scientific notation with base 10 exponents 3e4 3e-4 .3e-4
10568
+ pattern:
10569
+ /(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,
10570
+ lookbehind: true
10571
+ },
10572
+ {
10573
+ // NAN literal syntax NAN: 80000deadbeef, NAN: a
10574
+ pattern: /(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,
10575
+ lookbehind: true
10576
+ },
10577
+ {
10578
+ /*
10579
+ base prefix floats 0x1.0p3 (8.0) 0b1.010p2 (5.0) 0x1.p1 0b1.11111111p11111...
10580
+ "The normalized hex form ±0x1.MMMMMMMMMMMMM[pP]±EEEE allows any floating-point number to be specified precisely.
10581
+ The values of MMMMMMMMMMMMM and EEEE map directly to the mantissa and exponent fields of the binary IEEE 754 representation."
10582
+ <https://docs.factorcode.org/content/article-syntax-floats.html>
10583
+ */
10584
+ pattern:
10585
+ /(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,
10586
+ lookbehind: true
10587
+ }
10588
+ ],
10589
+ // R/ regexp?\/\\/
10590
+ regexp: {
10591
+ pattern:
10592
+ /(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,
10593
+ lookbehind: true,
10594
+ alias: 'number',
10595
+ inside: {
10596
+ variable: /\\\S/,
10597
+ keyword: /[+?*\[\]^$(){}.|]/,
10598
+ operator: {
10599
+ pattern: /(\/)[idmsr]+(?:-[idmsr]+)?/,
10600
+ lookbehind: true
10601
+ }
10602
+ }
10603
+ },
10604
+ boolean: {
10605
+ pattern: /(^|\s)[tf](?=\s|$)/,
10606
+ lookbehind: true
10607
+ },
10608
+ // SBUF" asd", URL" ://...", P" /etc/"
10609
+ 'custom-string': {
10610
+ pattern: /(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,
10611
+ lookbehind: true,
10612
+ greedy: true,
10613
+ alias: 'string',
10614
+ inside: {
10615
+ number: /\\\S|%\w|\//
10616
+ }
10617
+ },
10618
+ 'multiline-string': [
10619
+ {
10620
+ // STRING: name \n content \n ; -> CONSTANT: name "content" (symbol)
10621
+ pattern: /(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,
10622
+ lookbehind: true,
10623
+ greedy: true,
10624
+ alias: 'string',
10625
+ inside: {
10626
+ number: string_inside.number,
10627
+ // trailing semicolon on its own line
10628
+ 'semicolon-or-setlocal': {
10629
+ pattern: /([\r\n][ \t]*);(?=\s|$)/,
10630
+ lookbehind: true,
10631
+ alias: 'function'
10632
+ }
10633
+ }
10634
+ },
10635
+ {
10636
+ // HEREDOC: marker \n content \n marker ; -> "content" (immediate)
10637
+ pattern: /(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,
10638
+ lookbehind: true,
10639
+ greedy: true,
10640
+ alias: 'string',
10641
+ inside: string_inside
10642
+ },
10643
+ {
10644
+ // [[ string ]], [==[ string]==]
10645
+ pattern: /(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10646
+ lookbehind: true,
10647
+ greedy: true,
10648
+ alias: 'string',
10649
+ inside: string_inside
10650
+ }
10651
+ ],
10652
+ 'special-using': {
10653
+ pattern: /(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,
10654
+ lookbehind: true,
10655
+ alias: 'function',
10656
+ inside: {
10657
+ // this is essentially a regex for vocab names, which i don't want to specify
10658
+ // but the USING: gets picked up as a vocab name
10659
+ string: {
10660
+ pattern: /(\s)[^:\s]+/,
10661
+ lookbehind: true
10662
+ }
10663
+ }
10664
+ },
10665
+ /* this description of stack effect literal syntax is not complete and not as specific as theoretically possible
10666
+ trying to do better is more work and regex-computation-time than it's worth though.
10667
+ - we'd like to have the "delimiter" parts of the stack effect [ (, --, and ) ] be a different (less-important or comment-like) colour to the stack effect contents
10668
+ - we'd like if nested stack effects were treated as such rather than just appearing flat (with `inside`)
10669
+ - we'd like if the following variable name conventions were recognised specifically:
10670
+ special row variables = ..a b..
10671
+ type and stack effect annotations end with a colon = ( quot: ( a: ( -- ) -- b ) -- x ), ( x: number -- )
10672
+ word throws unconditional error = *
10673
+ any other word-like variable name = a ? q' etc
10674
+ https://docs.factorcode.org/content/article-effects.html
10675
+ these are pretty complicated to highlight properly without a real parser, and therefore out of scope
10676
+ the old pattern, which may be later useful, was: (^|\s)(?:call|execute|eval)?\((?:\s+[^"\r\n\t ]\S*)*?\s+--(?:\s+[^"\n\t ]\S*)*?\s+\)(?=\s|$)
10677
+ */
10678
+ // current solution is not great
10679
+ 'stack-effect-delimiter': [
10680
+ {
10681
+ // opening parenthesis
10682
+ pattern: /(^|\s)(?:call|eval|execute)?\((?=\s)/,
10683
+ lookbehind: true,
10684
+ alias: 'operator'
10685
+ },
10686
+ {
10687
+ // middle --
10688
+ pattern: /(\s)--(?=\s)/,
10689
+ lookbehind: true,
10690
+ alias: 'operator'
10691
+ },
10692
+ {
10693
+ // closing parenthesis
10694
+ pattern: /(\s)\)(?=\s|$)/,
10695
+ lookbehind: true,
10696
+ alias: 'operator'
10697
+ }
10698
+ ],
10699
+ combinators: {
10700
+ pattern: null,
10701
+ lookbehind: true,
10702
+ alias: 'keyword'
10703
+ },
10704
+ 'kernel-builtin': {
10705
+ pattern: null,
10706
+ lookbehind: true,
10707
+ alias: 'variable'
10708
+ },
10709
+ 'sequences-builtin': {
10710
+ pattern: null,
10711
+ lookbehind: true,
10712
+ alias: 'variable'
10713
+ },
10714
+ 'math-builtin': {
10715
+ pattern: null,
10716
+ lookbehind: true,
10717
+ alias: 'variable'
10718
+ },
10719
+ 'constructor-word': {
10720
+ // <array> but not <=>
10721
+ pattern: /(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,
10722
+ lookbehind: true,
10723
+ alias: 'keyword'
10724
+ },
10725
+ 'other-builtin-syntax': {
10726
+ pattern: null,
10727
+ lookbehind: true,
10728
+ alias: 'operator'
10729
+ },
10730
+ /*
10731
+ full list of supported word naming conventions: (the convention appears outside of the [brackets])
10732
+ set-[x]
10733
+ change-[x]
10734
+ with-[x]
10735
+ new-[x]
10736
+ >[string]
10737
+ [base]>
10738
+ [string]>[number]
10739
+ +[symbol]+
10740
+ [boolean-word]?
10741
+ ?[of]
10742
+ [slot-reader]>>
10743
+ >>[slot-setter]
10744
+ [slot-writer]<<
10745
+ ([implementation-detail])
10746
+ [mutater]!
10747
+ [variant]*
10748
+ [prettyprint].
10749
+ $[help-markup]
10750
+ <constructors>, SYNTAX:, etc are supported by their own patterns.
10751
+ `with` and `new` from `kernel` are their own builtins.
10752
+ see <https://docs.factorcode.org/content/article-conventions.html>
10753
+ */
10754
+ 'conventionally-named-word': {
10755
+ pattern:
10756
+ /(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,
10757
+ lookbehind: true,
10758
+ alias: 'keyword'
10759
+ },
10760
+ 'colon-syntax': {
10761
+ pattern: /(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,
10762
+ lookbehind: true,
10763
+ greedy: true,
10764
+ alias: 'function'
10765
+ },
10766
+ 'semicolon-or-setlocal': {
10767
+ pattern: /(\s)(?:;|:>)(?=\s|$)/,
10768
+ lookbehind: true,
10769
+ alias: 'function'
10770
+ },
10771
+ // do not highlight leading } or trailing X{ at the begin/end of the file as it's invalid syntax
10772
+ 'curly-brace-literal-delimiter': [
10773
+ {
10774
+ // opening
10775
+ pattern: /(^|\s)[a-z]*\{(?=\s)/i,
10776
+ lookbehind: true,
10777
+ alias: 'operator'
10778
+ },
10779
+ {
10780
+ // closing
10781
+ pattern: /(\s)\}(?=\s|$)/,
10782
+ lookbehind: true,
10783
+ alias: 'operator'
10784
+ }
10785
+ ],
10786
+ // do not highlight leading ] or trailing [ at the begin/end of the file as it's invalid syntax
10787
+ 'quotation-delimiter': [
10788
+ {
10789
+ // opening
10790
+ pattern: /(^|\s)\[(?=\s)/,
10791
+ lookbehind: true,
10792
+ alias: 'operator'
10793
+ },
10794
+ {
10795
+ // closing
10796
+ pattern: /(\s)\](?=\s|$)/,
10797
+ lookbehind: true,
10798
+ alias: 'operator'
10799
+ }
10800
+ ],
10801
+ 'normal-word': {
10802
+ pattern: /(^|\s)[^"\s]\S*(?=\s|$)/,
10803
+ lookbehind: true
10804
+ },
10805
+ /*
10806
+ basic first-class string "a"
10807
+ with escaped double-quote "a\""
10808
+ escaped backslash "\\"
10809
+ and general escapes since Factor has so many "\N"
10810
+ syntax that works in the reference implementation that isn't fully
10811
+ supported because it's an implementation detail:
10812
+ "string 1""string 2" -> 2 strings (works anyway)
10813
+ "string"5 -> string, 5
10814
+ "string"[ ] -> string, quotation
10815
+ { "a"} -> array<string>
10816
+ the rest of those examples all properly recognise the string, but not
10817
+ the other object (number, quotation, etc)
10818
+ this is fine for a regex-only implementation.
10819
+ */
10820
+ string: {
10821
+ pattern: /"(?:\\\S|[^"\\])*"/,
10822
+ greedy: true,
10823
+ inside: string_inside
10824
+ }
10825
+ };
10826
+ var escape = function (str) {
10827
+ return (str + '').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1')
10828
+ };
10829
+ var arrToWordsRegExp = function (arr) {
10830
+ return new RegExp('(^|\\s)(?:' + arr.map(escape).join('|') + ')(?=\\s|$)')
10831
+ };
10832
+ var builtins = {
10833
+ 'kernel-builtin': [
10834
+ 'or',
10835
+ '2nipd',
10836
+ '4drop',
10837
+ 'tuck',
10838
+ 'wrapper',
10839
+ 'nip',
10840
+ 'wrapper?',
10841
+ 'callstack>array',
10842
+ 'die',
10843
+ 'dupd',
10844
+ 'callstack',
10845
+ 'callstack?',
10846
+ '3dup',
10847
+ 'hashcode',
10848
+ 'pick',
10849
+ '4nip',
10850
+ 'build',
10851
+ '>boolean',
10852
+ 'nipd',
10853
+ 'clone',
10854
+ '5nip',
10855
+ 'eq?',
10856
+ '?',
10857
+ '=',
10858
+ 'swapd',
10859
+ '2over',
10860
+ 'clear',
10861
+ '2dup',
10862
+ 'get-retainstack',
10863
+ 'not',
10864
+ 'tuple?',
10865
+ 'dup',
10866
+ '3nipd',
10867
+ 'call',
10868
+ '-rotd',
10869
+ 'object',
10870
+ 'drop',
10871
+ 'assert=',
10872
+ 'assert?',
10873
+ '-rot',
10874
+ 'execute',
10875
+ 'boa',
10876
+ 'get-callstack',
10877
+ 'curried?',
10878
+ '3drop',
10879
+ 'pickd',
10880
+ 'overd',
10881
+ 'over',
10882
+ 'roll',
10883
+ '3nip',
10884
+ 'swap',
10885
+ 'and',
10886
+ '2nip',
10887
+ 'rotd',
10888
+ 'throw',
10889
+ '(clone)',
10890
+ 'hashcode*',
10891
+ 'spin',
10892
+ 'reach',
10893
+ '4dup',
10894
+ 'equal?',
10895
+ 'get-datastack',
10896
+ 'assert',
10897
+ '2drop',
10898
+ '<wrapper>',
10899
+ 'boolean?',
10900
+ 'identity-hashcode',
10901
+ 'identity-tuple?',
10902
+ 'null',
10903
+ 'composed?',
10904
+ 'new',
10905
+ '5drop',
10906
+ 'rot',
10907
+ '-roll',
10908
+ 'xor',
10909
+ 'identity-tuple',
10910
+ 'boolean'
10911
+ ],
10912
+ 'other-builtin-syntax': [
10913
+ // syntax
10914
+ '=======',
10915
+ 'recursive',
10916
+ 'flushable',
10917
+ '>>',
10918
+ '<<<<<<',
10919
+ 'M\\',
10920
+ 'B',
10921
+ 'PRIVATE>',
10922
+ '\\',
10923
+ '======',
10924
+ 'final',
10925
+ 'inline',
10926
+ 'delimiter',
10927
+ 'deprecated',
10928
+ '<PRIVATE',
10929
+ '>>>>>>',
10930
+ '<<<<<<<',
10931
+ 'parse-complex',
10932
+ 'malformed-complex',
10933
+ 'read-only',
10934
+ '>>>>>>>',
10935
+ 'call-next-method',
10936
+ '<<',
10937
+ 'foldable', // literals
10938
+ '$',
10939
+ '$[',
10940
+ '${'
10941
+ ],
10942
+ 'sequences-builtin': [
10943
+ 'member-eq?',
10944
+ 'mismatch',
10945
+ 'append',
10946
+ 'assert-sequence=',
10947
+ 'longer',
10948
+ 'repetition',
10949
+ 'clone-like',
10950
+ '3sequence',
10951
+ 'assert-sequence?',
10952
+ 'last-index-from',
10953
+ 'reversed',
10954
+ 'index-from',
10955
+ 'cut*',
10956
+ 'pad-tail',
10957
+ 'join-as',
10958
+ 'remove-eq!',
10959
+ 'concat-as',
10960
+ 'but-last',
10961
+ 'snip',
10962
+ 'nths',
10963
+ 'nth',
10964
+ 'sequence',
10965
+ 'longest',
10966
+ 'slice?',
10967
+ '<slice>',
10968
+ 'remove-nth',
10969
+ 'tail-slice',
10970
+ 'empty?',
10971
+ 'tail*',
10972
+ 'member?',
10973
+ 'virtual-sequence?',
10974
+ 'set-length',
10975
+ 'drop-prefix',
10976
+ 'iota',
10977
+ 'unclip',
10978
+ 'bounds-error?',
10979
+ 'unclip-last-slice',
10980
+ 'non-negative-integer-expected',
10981
+ 'non-negative-integer-expected?',
10982
+ 'midpoint@',
10983
+ 'longer?',
10984
+ '?set-nth',
10985
+ '?first',
10986
+ 'rest-slice',
10987
+ 'prepend-as',
10988
+ 'prepend',
10989
+ 'fourth',
10990
+ 'sift',
10991
+ 'subseq-start',
10992
+ 'new-sequence',
10993
+ '?last',
10994
+ 'like',
10995
+ 'first4',
10996
+ '1sequence',
10997
+ 'reverse',
10998
+ 'slice',
10999
+ 'virtual@',
11000
+ 'repetition?',
11001
+ 'set-last',
11002
+ 'index',
11003
+ '4sequence',
11004
+ 'max-length',
11005
+ 'set-second',
11006
+ 'immutable-sequence',
11007
+ 'first2',
11008
+ 'first3',
11009
+ 'supremum',
11010
+ 'unclip-slice',
11011
+ 'suffix!',
11012
+ 'insert-nth',
11013
+ 'tail',
11014
+ '3append',
11015
+ 'short',
11016
+ 'suffix',
11017
+ 'concat',
11018
+ 'flip',
11019
+ 'immutable?',
11020
+ 'reverse!',
11021
+ '2sequence',
11022
+ 'sum',
11023
+ 'delete-all',
11024
+ 'indices',
11025
+ 'snip-slice',
11026
+ '<iota>',
11027
+ 'check-slice',
11028
+ 'sequence?',
11029
+ 'head',
11030
+ 'append-as',
11031
+ 'halves',
11032
+ 'sequence=',
11033
+ 'collapse-slice',
11034
+ '?second',
11035
+ 'slice-error?',
11036
+ 'product',
11037
+ 'bounds-check?',
11038
+ 'bounds-check',
11039
+ 'immutable',
11040
+ 'virtual-exemplar',
11041
+ 'harvest',
11042
+ 'remove',
11043
+ 'pad-head',
11044
+ 'last',
11045
+ 'set-fourth',
11046
+ 'cartesian-product',
11047
+ 'remove-eq',
11048
+ 'shorten',
11049
+ 'shorter',
11050
+ 'reversed?',
11051
+ 'shorter?',
11052
+ 'shortest',
11053
+ 'head-slice',
11054
+ 'pop*',
11055
+ 'tail-slice*',
11056
+ 'but-last-slice',
11057
+ 'iota?',
11058
+ 'append!',
11059
+ 'cut-slice',
11060
+ 'new-resizable',
11061
+ 'head-slice*',
11062
+ 'sequence-hashcode',
11063
+ 'pop',
11064
+ 'set-nth',
11065
+ '?nth',
11066
+ 'second',
11067
+ 'join',
11068
+ 'immutable-sequence?',
11069
+ '<reversed>',
11070
+ '3append-as',
11071
+ 'virtual-sequence',
11072
+ 'subseq?',
11073
+ 'remove-nth!',
11074
+ 'length',
11075
+ 'last-index',
11076
+ 'lengthen',
11077
+ 'assert-sequence',
11078
+ 'copy',
11079
+ 'move',
11080
+ 'third',
11081
+ 'first',
11082
+ 'tail?',
11083
+ 'set-first',
11084
+ 'prefix',
11085
+ 'bounds-error',
11086
+ '<repetition>',
11087
+ 'exchange',
11088
+ 'surround',
11089
+ 'cut',
11090
+ 'min-length',
11091
+ 'set-third',
11092
+ 'push-all',
11093
+ 'head?',
11094
+ 'subseq-start-from',
11095
+ 'delete-slice',
11096
+ 'rest',
11097
+ 'sum-lengths',
11098
+ 'head*',
11099
+ 'infimum',
11100
+ 'remove!',
11101
+ 'glue',
11102
+ 'slice-error',
11103
+ 'subseq',
11104
+ 'push',
11105
+ 'replace-slice',
11106
+ 'subseq-as',
11107
+ 'unclip-last'
11108
+ ],
11109
+ 'math-builtin': [
11110
+ 'number=',
11111
+ 'next-power-of-2',
11112
+ '?1+',
11113
+ 'fp-special?',
11114
+ 'imaginary-part',
11115
+ 'float>bits',
11116
+ 'number?',
11117
+ 'fp-infinity?',
11118
+ 'bignum?',
11119
+ 'fp-snan?',
11120
+ 'denominator',
11121
+ 'gcd',
11122
+ '*',
11123
+ '+',
11124
+ 'fp-bitwise=',
11125
+ '-',
11126
+ 'u>=',
11127
+ '/',
11128
+ '>=',
11129
+ 'bitand',
11130
+ 'power-of-2?',
11131
+ 'log2-expects-positive',
11132
+ 'neg?',
11133
+ '<',
11134
+ 'log2',
11135
+ '>',
11136
+ 'integer?',
11137
+ 'number',
11138
+ 'bits>double',
11139
+ '2/',
11140
+ 'zero?',
11141
+ 'bits>float',
11142
+ 'float?',
11143
+ 'shift',
11144
+ 'ratio?',
11145
+ 'rect>',
11146
+ 'even?',
11147
+ 'ratio',
11148
+ 'fp-sign',
11149
+ 'bitnot',
11150
+ '>fixnum',
11151
+ 'complex?',
11152
+ '/i',
11153
+ 'integer>fixnum',
11154
+ '/f',
11155
+ 'sgn',
11156
+ '>bignum',
11157
+ 'next-float',
11158
+ 'u<',
11159
+ 'u>',
11160
+ 'mod',
11161
+ 'recip',
11162
+ 'rational',
11163
+ '>float',
11164
+ '2^',
11165
+ 'integer',
11166
+ 'fixnum?',
11167
+ 'neg',
11168
+ 'fixnum',
11169
+ 'sq',
11170
+ 'bignum',
11171
+ '>rect',
11172
+ 'bit?',
11173
+ 'fp-qnan?',
11174
+ 'simple-gcd',
11175
+ 'complex',
11176
+ '<fp-nan>',
11177
+ 'real',
11178
+ '>fraction',
11179
+ 'double>bits',
11180
+ 'bitor',
11181
+ 'rem',
11182
+ 'fp-nan-payload',
11183
+ 'real-part',
11184
+ 'log2-expects-positive?',
11185
+ 'prev-float',
11186
+ 'align',
11187
+ 'unordered?',
11188
+ 'float',
11189
+ 'fp-nan?',
11190
+ 'abs',
11191
+ 'bitxor',
11192
+ 'integer>fixnum-strict',
11193
+ 'u<=',
11194
+ 'odd?',
11195
+ '<=',
11196
+ '/mod',
11197
+ '>integer',
11198
+ 'real?',
11199
+ 'rational?',
11200
+ 'numerator'
11201
+ ] // that's all for now
11202
+ };
11203
+ Object.keys(builtins).forEach(function (k) {
11204
+ factor[k].pattern = arrToWordsRegExp(builtins[k]);
11205
+ });
11206
+ var combinators = [
11207
+ // kernel
11208
+ '2bi',
11209
+ 'while',
11210
+ '2tri',
11211
+ 'bi*',
11212
+ '4dip',
11213
+ 'both?',
11214
+ 'same?',
11215
+ 'tri@',
11216
+ 'curry',
11217
+ 'prepose',
11218
+ '3bi',
11219
+ '?if',
11220
+ 'tri*',
11221
+ '2keep',
11222
+ '3keep',
11223
+ 'curried',
11224
+ '2keepd',
11225
+ 'when',
11226
+ '2bi*',
11227
+ '2tri*',
11228
+ '4keep',
11229
+ 'bi@',
11230
+ 'keepdd',
11231
+ 'do',
11232
+ 'unless*',
11233
+ 'tri-curry',
11234
+ 'if*',
11235
+ 'loop',
11236
+ 'bi-curry*',
11237
+ 'when*',
11238
+ '2bi@',
11239
+ '2tri@',
11240
+ 'with',
11241
+ '2with',
11242
+ 'either?',
11243
+ 'bi',
11244
+ 'until',
11245
+ '3dip',
11246
+ '3curry',
11247
+ 'tri-curry*',
11248
+ 'tri-curry@',
11249
+ 'bi-curry',
11250
+ 'keepd',
11251
+ 'compose',
11252
+ '2dip',
11253
+ 'if',
11254
+ '3tri',
11255
+ 'unless',
11256
+ 'tuple',
11257
+ 'keep',
11258
+ '2curry',
11259
+ 'tri',
11260
+ 'most',
11261
+ 'while*',
11262
+ 'dip',
11263
+ 'composed',
11264
+ 'bi-curry@', // sequences
11265
+ 'find-last-from',
11266
+ 'trim-head-slice',
11267
+ 'map-as',
11268
+ 'each-from',
11269
+ 'none?',
11270
+ 'trim-tail',
11271
+ 'partition',
11272
+ 'if-empty',
11273
+ 'accumulate*',
11274
+ 'reject!',
11275
+ 'find-from',
11276
+ 'accumulate-as',
11277
+ 'collector-for-as',
11278
+ 'reject',
11279
+ 'map',
11280
+ 'map-sum',
11281
+ 'accumulate!',
11282
+ '2each-from',
11283
+ 'follow',
11284
+ 'supremum-by',
11285
+ 'map!',
11286
+ 'unless-empty',
11287
+ 'collector',
11288
+ 'padding',
11289
+ 'reduce-index',
11290
+ 'replicate-as',
11291
+ 'infimum-by',
11292
+ 'trim-tail-slice',
11293
+ 'count',
11294
+ 'find-index',
11295
+ 'filter',
11296
+ 'accumulate*!',
11297
+ 'reject-as',
11298
+ 'map-integers',
11299
+ 'map-find',
11300
+ 'reduce',
11301
+ 'selector',
11302
+ 'interleave',
11303
+ '2map',
11304
+ 'filter-as',
11305
+ 'binary-reduce',
11306
+ 'map-index-as',
11307
+ 'find',
11308
+ 'produce',
11309
+ 'filter!',
11310
+ 'replicate',
11311
+ 'cartesian-map',
11312
+ 'cartesian-each',
11313
+ 'find-index-from',
11314
+ 'map-find-last',
11315
+ '3map-as',
11316
+ '3map',
11317
+ 'find-last',
11318
+ 'selector-as',
11319
+ '2map-as',
11320
+ '2map-reduce',
11321
+ 'accumulate',
11322
+ 'each',
11323
+ 'each-index',
11324
+ 'accumulate*-as',
11325
+ 'when-empty',
11326
+ 'all?',
11327
+ 'collector-as',
11328
+ 'push-either',
11329
+ 'new-like',
11330
+ 'collector-for',
11331
+ '2selector',
11332
+ 'push-if',
11333
+ '2all?',
11334
+ 'map-reduce',
11335
+ '3each',
11336
+ 'any?',
11337
+ 'trim-slice',
11338
+ '2reduce',
11339
+ 'change-nth',
11340
+ 'produce-as',
11341
+ '2each',
11342
+ 'trim',
11343
+ 'trim-head',
11344
+ 'cartesian-find',
11345
+ 'map-index', // math
11346
+ 'if-zero',
11347
+ 'each-integer',
11348
+ 'unless-zero',
11349
+ '(find-integer)',
11350
+ 'when-zero',
11351
+ 'find-last-integer',
11352
+ '(all-integers?)',
11353
+ 'times',
11354
+ '(each-integer)',
11355
+ 'find-integer',
11356
+ 'all-integers?', // math.combinators
11357
+ 'unless-negative',
11358
+ 'if-positive',
11359
+ 'when-positive',
11360
+ 'when-negative',
11361
+ 'unless-positive',
11362
+ 'if-negative', // combinators
11363
+ 'case',
11364
+ '2cleave',
11365
+ 'cond>quot',
11366
+ 'case>quot',
11367
+ '3cleave',
11368
+ 'wrong-values',
11369
+ 'to-fixed-point',
11370
+ 'alist>quot',
11371
+ 'cond',
11372
+ 'cleave',
11373
+ 'call-effect',
11374
+ 'recursive-hashcode',
11375
+ 'spread',
11376
+ 'deep-spread>quot', // combinators.short-circuit
11377
+ '2||',
11378
+ '0||',
11379
+ 'n||',
11380
+ '0&&',
11381
+ '2&&',
11382
+ '3||',
11383
+ '1||',
11384
+ '1&&',
11385
+ 'n&&',
11386
+ '3&&', // combinators.smart
11387
+ 'smart-unless*',
11388
+ 'keep-inputs',
11389
+ 'reduce-outputs',
11390
+ 'smart-when*',
11391
+ 'cleave>array',
11392
+ 'smart-with',
11393
+ 'smart-apply',
11394
+ 'smart-if',
11395
+ 'inputs/outputs',
11396
+ 'output>sequence-n',
11397
+ 'map-outputs',
11398
+ 'map-reduce-outputs',
11399
+ 'dropping',
11400
+ 'output>array',
11401
+ 'smart-map-reduce',
11402
+ 'smart-2map-reduce',
11403
+ 'output>array-n',
11404
+ 'nullary',
11405
+ 'input<sequence',
11406
+ 'append-outputs',
11407
+ 'drop-inputs',
11408
+ 'inputs',
11409
+ 'smart-2reduce',
11410
+ 'drop-outputs',
11411
+ 'smart-reduce',
11412
+ 'preserving',
11413
+ 'smart-when',
11414
+ 'outputs',
11415
+ 'append-outputs-as',
11416
+ 'smart-unless',
11417
+ 'smart-if*',
11418
+ 'sum-outputs',
11419
+ 'input<sequence-unsafe',
11420
+ 'output>sequence' // tafn
11421
+ ];
11422
+ factor.combinators.pattern = arrToWordsRegExp(combinators);
11423
+ Prism.languages.factor = factor;
11424
+ })(Prism);
11425
+ }
11426
+ return factor_1;
11332
11427
  }
11333
11428
 
11334
- var _false = $false;
11335
- $false.displayName = '$false';
11336
- $false.aliases = [];
11337
- function $false(Prism) {
11429
+ var _false;
11430
+ var hasRequired_false;
11431
+
11432
+ function require_false () {
11433
+ if (hasRequired_false) return _false;
11434
+ hasRequired_false = 1;
11435
+
11436
+ _false = $false;
11437
+ $false.displayName = '$false';
11438
+ $false.aliases = [];
11439
+ function $false(Prism) {
11338
11440
  (function (Prism) {
11339
- /**
11340
- * Based on the manual by Wouter van Oortmerssen.
11341
- *
11342
- * @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504}
11343
- */
11344
- Prism.languages['false'] = {
11345
- comment: {
11346
- pattern: /\{[^}]*\}/
11347
- },
11348
- string: {
11349
- pattern: /"[^"]*"/,
11350
- greedy: true
11351
- },
11352
- 'character-code': {
11353
- pattern: /'(?:[^\r]|\r\n?)/,
11354
- alias: 'number'
11355
- },
11356
- 'assembler-code': {
11357
- pattern: /\d+`/,
11358
- alias: 'important'
11359
- },
11360
- number: /\d+/,
11361
- operator: /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
11362
- punctuation: /\[|\]/,
11363
- variable: /[a-z]/,
11364
- 'non-standard': {
11365
- pattern: /[()<BDO®]/,
11366
- alias: 'bold'
11367
- }
11368
- };
11369
- })(Prism);
11441
+ /**
11442
+ * Based on the manual by Wouter van Oortmerssen.
11443
+ *
11444
+ * @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504}
11445
+ */
11446
+ Prism.languages['false'] = {
11447
+ comment: {
11448
+ pattern: /\{[^}]*\}/
11449
+ },
11450
+ string: {
11451
+ pattern: /"[^"]*"/,
11452
+ greedy: true
11453
+ },
11454
+ 'character-code': {
11455
+ pattern: /'(?:[^\r]|\r\n?)/,
11456
+ alias: 'number'
11457
+ },
11458
+ 'assembler-code': {
11459
+ pattern: /\d+`/,
11460
+ alias: 'important'
11461
+ },
11462
+ number: /\d+/,
11463
+ operator: /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
11464
+ punctuation: /\[|\]/,
11465
+ variable: /[a-z]/,
11466
+ 'non-standard': {
11467
+ pattern: /[()<BDO®]/,
11468
+ alias: 'bold'
11469
+ }
11470
+ };
11471
+ })(Prism);
11472
+ }
11473
+ return _false;
11370
11474
  }
11371
11475
 
11372
- var firestoreSecurityRules_1 = firestoreSecurityRules;
11373
- firestoreSecurityRules.displayName = 'firestoreSecurityRules';
11374
- firestoreSecurityRules.aliases = [];
11375
- function firestoreSecurityRules(Prism) {
11376
- Prism.languages['firestore-security-rules'] = Prism.languages.extend(
11377
- 'clike',
11378
- {
11379
- comment: /\/\/.*/,
11380
- keyword:
11381
- /\b(?:allow|function|if|match|null|return|rules_version|service)\b/,
11382
- operator: /&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/
11383
- }
11384
- );
11385
- delete Prism.languages['firestore-security-rules']['class-name'];
11386
- Prism.languages.insertBefore('firestore-security-rules', 'keyword', {
11387
- path: {
11388
- pattern:
11389
- /(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,
11390
- lookbehind: true,
11391
- greedy: true,
11392
- inside: {
11393
- variable: {
11394
- pattern: /\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,
11395
- inside: {
11396
- operator: /=/,
11397
- keyword: /\*\*/,
11398
- punctuation: /[.$(){}]/
11399
- }
11400
- },
11401
- punctuation: /\//
11402
- }
11403
- },
11404
- method: {
11405
- // to make the pattern shorter, the actual method names are omitted
11406
- pattern: /(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,
11407
- lookbehind: true,
11408
- alias: 'builtin',
11409
- inside: {
11410
- punctuation: /,/
11411
- }
11412
- }
11413
- });
11476
+ var firestoreSecurityRules_1;
11477
+ var hasRequiredFirestoreSecurityRules;
11478
+
11479
+ function requireFirestoreSecurityRules () {
11480
+ if (hasRequiredFirestoreSecurityRules) return firestoreSecurityRules_1;
11481
+ hasRequiredFirestoreSecurityRules = 1;
11482
+
11483
+ firestoreSecurityRules_1 = firestoreSecurityRules;
11484
+ firestoreSecurityRules.displayName = 'firestoreSecurityRules';
11485
+ firestoreSecurityRules.aliases = [];
11486
+ function firestoreSecurityRules(Prism) {
11487
+ Prism.languages['firestore-security-rules'] = Prism.languages.extend(
11488
+ 'clike',
11489
+ {
11490
+ comment: /\/\/.*/,
11491
+ keyword:
11492
+ /\b(?:allow|function|if|match|null|return|rules_version|service)\b/,
11493
+ operator: /&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/
11494
+ }
11495
+ );
11496
+ delete Prism.languages['firestore-security-rules']['class-name'];
11497
+ Prism.languages.insertBefore('firestore-security-rules', 'keyword', {
11498
+ path: {
11499
+ pattern:
11500
+ /(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,
11501
+ lookbehind: true,
11502
+ greedy: true,
11503
+ inside: {
11504
+ variable: {
11505
+ pattern: /\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,
11506
+ inside: {
11507
+ operator: /=/,
11508
+ keyword: /\*\*/,
11509
+ punctuation: /[.$(){}]/
11510
+ }
11511
+ },
11512
+ punctuation: /\//
11513
+ }
11514
+ },
11515
+ method: {
11516
+ // to make the pattern shorter, the actual method names are omitted
11517
+ pattern: /(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,
11518
+ lookbehind: true,
11519
+ alias: 'builtin',
11520
+ inside: {
11521
+ punctuation: /,/
11522
+ }
11523
+ }
11524
+ });
11525
+ }
11526
+ return firestoreSecurityRules_1;
11414
11527
  }
11415
11528
 
11416
- var flow_1 = flow;
11417
- flow.displayName = 'flow';
11418
- flow.aliases = [];
11419
- function flow(Prism) {
11529
+ var flow_1;
11530
+ var hasRequiredFlow;
11531
+
11532
+ function requireFlow () {
11533
+ if (hasRequiredFlow) return flow_1;
11534
+ hasRequiredFlow = 1;
11535
+
11536
+ flow_1 = flow;
11537
+ flow.displayName = 'flow';
11538
+ flow.aliases = [];
11539
+ function flow(Prism) {
11420
11540
  (function (Prism) {
11421
- Prism.languages.flow = Prism.languages.extend('javascript', {});
11422
- Prism.languages.insertBefore('flow', 'keyword', {
11423
- type: [
11424
- {
11425
- pattern:
11426
- /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
11427
- alias: 'tag'
11428
- }
11429
- ]
11430
- });
11431
- Prism.languages.flow['function-variable'].pattern =
11432
- /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i;
11433
- delete Prism.languages.flow['parameter'];
11434
- Prism.languages.insertBefore('flow', 'operator', {
11435
- 'flow-punctuation': {
11436
- pattern: /\{\||\|\}/,
11437
- alias: 'punctuation'
11438
- }
11439
- });
11440
- if (!Array.isArray(Prism.languages.flow.keyword)) {
11441
- Prism.languages.flow.keyword = [Prism.languages.flow.keyword];
11442
- }
11443
- Prism.languages.flow.keyword.unshift(
11444
- {
11445
- pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
11446
- lookbehind: true
11447
- },
11448
- {
11449
- pattern:
11450
- /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,
11451
- lookbehind: true
11452
- }
11453
- );
11454
- })(Prism);
11541
+ Prism.languages.flow = Prism.languages.extend('javascript', {});
11542
+ Prism.languages.insertBefore('flow', 'keyword', {
11543
+ type: [
11544
+ {
11545
+ pattern:
11546
+ /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
11547
+ alias: 'tag'
11548
+ }
11549
+ ]
11550
+ });
11551
+ Prism.languages.flow['function-variable'].pattern =
11552
+ /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i;
11553
+ delete Prism.languages.flow['parameter'];
11554
+ Prism.languages.insertBefore('flow', 'operator', {
11555
+ 'flow-punctuation': {
11556
+ pattern: /\{\||\|\}/,
11557
+ alias: 'punctuation'
11558
+ }
11559
+ });
11560
+ if (!Array.isArray(Prism.languages.flow.keyword)) {
11561
+ Prism.languages.flow.keyword = [Prism.languages.flow.keyword];
11562
+ }
11563
+ Prism.languages.flow.keyword.unshift(
11564
+ {
11565
+ pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
11566
+ lookbehind: true
11567
+ },
11568
+ {
11569
+ pattern:
11570
+ /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,
11571
+ lookbehind: true
11572
+ }
11573
+ );
11574
+ })(Prism);
11575
+ }
11576
+ return flow_1;
11455
11577
  }
11456
11578
 
11457
- var fortran_1 = fortran;
11458
- fortran.displayName = 'fortran';
11459
- fortran.aliases = [];
11460
- function fortran(Prism) {
11461
- Prism.languages.fortran = {
11462
- 'quoted-number': {
11463
- pattern: /[BOZ](['"])[A-F0-9]+\1/i,
11464
- alias: 'number'
11465
- },
11466
- string: {
11467
- pattern:
11468
- /(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,
11469
- inside: {
11470
- comment: {
11471
- pattern: /(&(?:\r\n?|\n)\s*)!.*/,
11472
- lookbehind: true
11473
- }
11474
- }
11475
- },
11476
- comment: {
11477
- pattern: /!.*/,
11478
- greedy: true
11479
- },
11480
- boolean: /\.(?:FALSE|TRUE)\.(?:_\w+)?/i,
11481
- number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,
11482
- keyword: [
11483
- // Types
11484
- /\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i, // END statements
11485
- /\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i, // Statements
11486
- /\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i, // Others
11487
- /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i
11488
- ],
11489
- operator: [
11490
- /\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,
11491
- {
11492
- // Use lookbehind to prevent confusion with (/ /)
11493
- pattern: /(^|(?!\().)\/(?!\))/,
11494
- lookbehind: true
11495
- }
11496
- ],
11497
- punctuation: /\(\/|\/\)|[(),;:&]/
11498
- };
11499
- }
11579
+ var fortran_1;
11580
+ var hasRequiredFortran;
11500
11581
 
11501
- var fsharp_1 = fsharp;
11502
- fsharp.displayName = 'fsharp';
11503
- fsharp.aliases = [];
11504
- function fsharp(Prism) {
11505
- Prism.languages.fsharp = Prism.languages.extend('clike', {
11506
- comment: [
11507
- {
11508
- pattern: /(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,
11509
- lookbehind: true,
11510
- greedy: true
11511
- },
11512
- {
11513
- pattern: /(^|[^\\:])\/\/.*/,
11514
- lookbehind: true,
11515
- greedy: true
11516
- }
11517
- ],
11518
- string: {
11519
- pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,
11520
- greedy: true
11521
- },
11522
- 'class-name': {
11523
- pattern:
11524
- /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,
11525
- lookbehind: true,
11526
- inside: {
11527
- operator: /->|\*/,
11528
- punctuation: /\./
11529
- }
11530
- },
11531
- keyword:
11532
- /\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,
11533
- number: [
11534
- /\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,
11535
- /\b0b[01]+(?:uy|y)?\b/,
11536
- /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,
11537
- /\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/
11538
- ],
11539
- operator:
11540
- /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/
11541
- });
11542
- Prism.languages.insertBefore('fsharp', 'keyword', {
11543
- preprocessor: {
11544
- pattern: /(^[\t ]*)#.*/m,
11545
- lookbehind: true,
11546
- alias: 'property',
11547
- inside: {
11548
- directive: {
11549
- pattern: /(^#)\b(?:else|endif|if|light|line|nowarn)\b/,
11550
- lookbehind: true,
11551
- alias: 'keyword'
11552
- }
11553
- }
11554
- }
11555
- });
11556
- Prism.languages.insertBefore('fsharp', 'punctuation', {
11557
- 'computation-expression': {
11558
- pattern: /\b[_a-z]\w*(?=\s*\{)/i,
11559
- alias: 'keyword'
11560
- }
11561
- });
11562
- Prism.languages.insertBefore('fsharp', 'string', {
11563
- annotation: {
11564
- pattern: /\[<.+?>\]/,
11565
- greedy: true,
11566
- inside: {
11567
- punctuation: /^\[<|>\]$/,
11568
- 'class-name': {
11569
- pattern: /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,
11570
- lookbehind: true
11571
- },
11572
- 'annotation-content': {
11573
- pattern: /[\s\S]+/,
11574
- inside: Prism.languages.fsharp
11575
- }
11576
- }
11577
- },
11578
- char: {
11579
- pattern:
11580
- /'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,
11581
- greedy: true
11582
- }
11583
- });
11582
+ function requireFortran () {
11583
+ if (hasRequiredFortran) return fortran_1;
11584
+ hasRequiredFortran = 1;
11585
+
11586
+ fortran_1 = fortran;
11587
+ fortran.displayName = 'fortran';
11588
+ fortran.aliases = [];
11589
+ function fortran(Prism) {
11590
+ Prism.languages.fortran = {
11591
+ 'quoted-number': {
11592
+ pattern: /[BOZ](['"])[A-F0-9]+\1/i,
11593
+ alias: 'number'
11594
+ },
11595
+ string: {
11596
+ pattern:
11597
+ /(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,
11598
+ inside: {
11599
+ comment: {
11600
+ pattern: /(&(?:\r\n?|\n)\s*)!.*/,
11601
+ lookbehind: true
11602
+ }
11603
+ }
11604
+ },
11605
+ comment: {
11606
+ pattern: /!.*/,
11607
+ greedy: true
11608
+ },
11609
+ boolean: /\.(?:FALSE|TRUE)\.(?:_\w+)?/i,
11610
+ number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,
11611
+ keyword: [
11612
+ // Types
11613
+ /\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i, // END statements
11614
+ /\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i, // Statements
11615
+ /\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i, // Others
11616
+ /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i
11617
+ ],
11618
+ operator: [
11619
+ /\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,
11620
+ {
11621
+ // Use lookbehind to prevent confusion with (/ /)
11622
+ pattern: /(^|(?!\().)\/(?!\))/,
11623
+ lookbehind: true
11624
+ }
11625
+ ],
11626
+ punctuation: /\(\/|\/\)|[(),;:&]/
11627
+ };
11628
+ }
11629
+ return fortran_1;
11630
+ }
11631
+
11632
+ var fsharp_1;
11633
+ var hasRequiredFsharp;
11634
+
11635
+ function requireFsharp () {
11636
+ if (hasRequiredFsharp) return fsharp_1;
11637
+ hasRequiredFsharp = 1;
11638
+
11639
+ fsharp_1 = fsharp;
11640
+ fsharp.displayName = 'fsharp';
11641
+ fsharp.aliases = [];
11642
+ function fsharp(Prism) {
11643
+ Prism.languages.fsharp = Prism.languages.extend('clike', {
11644
+ comment: [
11645
+ {
11646
+ pattern: /(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,
11647
+ lookbehind: true,
11648
+ greedy: true
11649
+ },
11650
+ {
11651
+ pattern: /(^|[^\\:])\/\/.*/,
11652
+ lookbehind: true,
11653
+ greedy: true
11654
+ }
11655
+ ],
11656
+ string: {
11657
+ pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,
11658
+ greedy: true
11659
+ },
11660
+ 'class-name': {
11661
+ pattern:
11662
+ /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,
11663
+ lookbehind: true,
11664
+ inside: {
11665
+ operator: /->|\*/,
11666
+ punctuation: /\./
11667
+ }
11668
+ },
11669
+ keyword:
11670
+ /\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,
11671
+ number: [
11672
+ /\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,
11673
+ /\b0b[01]+(?:uy|y)?\b/,
11674
+ /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,
11675
+ /\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/
11676
+ ],
11677
+ operator:
11678
+ /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/
11679
+ });
11680
+ Prism.languages.insertBefore('fsharp', 'keyword', {
11681
+ preprocessor: {
11682
+ pattern: /(^[\t ]*)#.*/m,
11683
+ lookbehind: true,
11684
+ alias: 'property',
11685
+ inside: {
11686
+ directive: {
11687
+ pattern: /(^#)\b(?:else|endif|if|light|line|nowarn)\b/,
11688
+ lookbehind: true,
11689
+ alias: 'keyword'
11690
+ }
11691
+ }
11692
+ }
11693
+ });
11694
+ Prism.languages.insertBefore('fsharp', 'punctuation', {
11695
+ 'computation-expression': {
11696
+ pattern: /\b[_a-z]\w*(?=\s*\{)/i,
11697
+ alias: 'keyword'
11698
+ }
11699
+ });
11700
+ Prism.languages.insertBefore('fsharp', 'string', {
11701
+ annotation: {
11702
+ pattern: /\[<.+?>\]/,
11703
+ greedy: true,
11704
+ inside: {
11705
+ punctuation: /^\[<|>\]$/,
11706
+ 'class-name': {
11707
+ pattern: /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,
11708
+ lookbehind: true
11709
+ },
11710
+ 'annotation-content': {
11711
+ pattern: /[\s\S]+/,
11712
+ inside: Prism.languages.fsharp
11713
+ }
11714
+ }
11715
+ },
11716
+ char: {
11717
+ pattern:
11718
+ /'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,
11719
+ greedy: true
11720
+ }
11721
+ });
11722
+ }
11723
+ return fsharp_1;
11584
11724
  }
11585
11725
 
11586
11726
  var ftl_1;
@@ -11785,98 +11925,125 @@ function requireGap () {
11785
11925
  return gap_1;
11786
11926
  }
11787
11927
 
11788
- var gcode_1 = gcode;
11789
- gcode.displayName = 'gcode';
11790
- gcode.aliases = [];
11791
- function gcode(Prism) {
11792
- Prism.languages.gcode = {
11793
- comment: /;.*|\B\(.*?\)\B/,
11794
- string: {
11795
- pattern: /"(?:""|[^"])*"/,
11796
- greedy: true
11797
- },
11798
- keyword: /\b[GM]\d+(?:\.\d+)?\b/,
11799
- property: /\b[A-Z]/,
11800
- checksum: {
11801
- pattern: /(\*)\d+/,
11802
- lookbehind: true,
11803
- alias: 'number'
11804
- },
11805
- // T0:0:0
11806
- punctuation: /[:*]/
11807
- };
11928
+ var gcode_1;
11929
+ var hasRequiredGcode;
11930
+
11931
+ function requireGcode () {
11932
+ if (hasRequiredGcode) return gcode_1;
11933
+ hasRequiredGcode = 1;
11934
+
11935
+ gcode_1 = gcode;
11936
+ gcode.displayName = 'gcode';
11937
+ gcode.aliases = [];
11938
+ function gcode(Prism) {
11939
+ Prism.languages.gcode = {
11940
+ comment: /;.*|\B\(.*?\)\B/,
11941
+ string: {
11942
+ pattern: /"(?:""|[^"])*"/,
11943
+ greedy: true
11944
+ },
11945
+ keyword: /\b[GM]\d+(?:\.\d+)?\b/,
11946
+ property: /\b[A-Z]/,
11947
+ checksum: {
11948
+ pattern: /(\*)\d+/,
11949
+ lookbehind: true,
11950
+ alias: 'number'
11951
+ },
11952
+ // T0:0:0
11953
+ punctuation: /[:*]/
11954
+ };
11955
+ }
11956
+ return gcode_1;
11808
11957
  }
11809
11958
 
11810
- var gdscript_1 = gdscript;
11811
- gdscript.displayName = 'gdscript';
11812
- gdscript.aliases = [];
11813
- function gdscript(Prism) {
11814
- Prism.languages.gdscript = {
11815
- comment: /#.*/,
11816
- string: {
11817
- pattern:
11818
- /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,
11819
- greedy: true
11820
- },
11821
- 'class-name': {
11822
- // class_name Foo, extends Bar, class InnerClass
11823
- // export(int) var baz, export(int, 0) var i
11824
- // as Node
11825
- // const FOO: int = 9, var bar: bool = true
11826
- // func add(reference: Item, amount: int) -> Item:
11827
- pattern:
11828
- /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,
11829
- lookbehind: true
11830
- },
11831
- keyword:
11832
- /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,
11833
- function: /\b[a-z_]\w*(?=[ \t]*\()/i,
11834
- variable: /\$\w+/,
11835
- number: [
11836
- /\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,
11837
- /\b(?:INF|NAN|PI|TAU)\b/
11838
- ],
11839
- constant: /\b[A-Z][A-Z_\d]*\b/,
11840
- boolean: /\b(?:false|true)\b/,
11841
- operator: /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,
11842
- punctuation: /[.:,;()[\]{}]/
11843
- };
11959
+ var gdscript_1;
11960
+ var hasRequiredGdscript;
11961
+
11962
+ function requireGdscript () {
11963
+ if (hasRequiredGdscript) return gdscript_1;
11964
+ hasRequiredGdscript = 1;
11965
+
11966
+ gdscript_1 = gdscript;
11967
+ gdscript.displayName = 'gdscript';
11968
+ gdscript.aliases = [];
11969
+ function gdscript(Prism) {
11970
+ Prism.languages.gdscript = {
11971
+ comment: /#.*/,
11972
+ string: {
11973
+ pattern:
11974
+ /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,
11975
+ greedy: true
11976
+ },
11977
+ 'class-name': {
11978
+ // class_name Foo, extends Bar, class InnerClass
11979
+ // export(int) var baz, export(int, 0) var i
11980
+ // as Node
11981
+ // const FOO: int = 9, var bar: bool = true
11982
+ // func add(reference: Item, amount: int) -> Item:
11983
+ pattern:
11984
+ /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,
11985
+ lookbehind: true
11986
+ },
11987
+ keyword:
11988
+ /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,
11989
+ function: /\b[a-z_]\w*(?=[ \t]*\()/i,
11990
+ variable: /\$\w+/,
11991
+ number: [
11992
+ /\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,
11993
+ /\b(?:INF|NAN|PI|TAU)\b/
11994
+ ],
11995
+ constant: /\b[A-Z][A-Z_\d]*\b/,
11996
+ boolean: /\b(?:false|true)\b/,
11997
+ operator: /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,
11998
+ punctuation: /[.:,;()[\]{}]/
11999
+ };
12000
+ }
12001
+ return gdscript_1;
11844
12002
  }
11845
12003
 
11846
- var gedcom_1 = gedcom;
11847
- gedcom.displayName = 'gedcom';
11848
- gedcom.aliases = [];
11849
- function gedcom(Prism) {
11850
- Prism.languages.gedcom = {
11851
- 'line-value': {
11852
- // Preceded by level, optional pointer, and tag
11853
- pattern:
11854
- /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,
11855
- lookbehind: true,
11856
- inside: {
11857
- pointer: {
11858
- pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,
11859
- alias: 'variable'
11860
- }
11861
- }
11862
- },
11863
- tag: {
11864
- // Preceded by level and optional pointer
11865
- pattern:
11866
- /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
11867
- lookbehind: true,
11868
- alias: 'string'
11869
- },
11870
- level: {
11871
- pattern: /(^[\t ]*)\d+/m,
11872
- lookbehind: true,
11873
- alias: 'number'
11874
- },
11875
- pointer: {
11876
- pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,
11877
- alias: 'variable'
11878
- }
11879
- };
12004
+ var gedcom_1;
12005
+ var hasRequiredGedcom;
12006
+
12007
+ function requireGedcom () {
12008
+ if (hasRequiredGedcom) return gedcom_1;
12009
+ hasRequiredGedcom = 1;
12010
+
12011
+ gedcom_1 = gedcom;
12012
+ gedcom.displayName = 'gedcom';
12013
+ gedcom.aliases = [];
12014
+ function gedcom(Prism) {
12015
+ Prism.languages.gedcom = {
12016
+ 'line-value': {
12017
+ // Preceded by level, optional pointer, and tag
12018
+ pattern:
12019
+ /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,
12020
+ lookbehind: true,
12021
+ inside: {
12022
+ pointer: {
12023
+ pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,
12024
+ alias: 'variable'
12025
+ }
12026
+ }
12027
+ },
12028
+ tag: {
12029
+ // Preceded by level and optional pointer
12030
+ pattern:
12031
+ /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
12032
+ lookbehind: true,
12033
+ alias: 'string'
12034
+ },
12035
+ level: {
12036
+ pattern: /(^[\t ]*)\d+/m,
12037
+ lookbehind: true,
12038
+ alias: 'number'
12039
+ },
12040
+ pointer: {
12041
+ pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,
12042
+ alias: 'variable'
12043
+ }
12044
+ };
12045
+ }
12046
+ return gedcom_1;
11880
12047
  }
11881
12048
 
11882
12049
  var gherkin_1;
@@ -12105,89 +12272,107 @@ function requireGml () {
12105
12272
  return gml_1;
12106
12273
  }
12107
12274
 
12108
- var gn_1 = gn;
12109
- gn.displayName = 'gn';
12110
- gn.aliases = ['gni'];
12111
- function gn(Prism) {
12112
- // https://gn.googlesource.com/gn/+/refs/heads/main/docs/reference.md#grammar
12113
- Prism.languages.gn = {
12114
- comment: {
12115
- pattern: /#.*/,
12116
- greedy: true
12117
- },
12118
- 'string-literal': {
12119
- pattern: /(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,
12120
- lookbehind: true,
12121
- greedy: true,
12122
- inside: {
12123
- interpolation: {
12124
- pattern:
12125
- /((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,
12126
- lookbehind: true,
12127
- inside: {
12128
- number: /^\$0x[\s\S]{2}$/,
12129
- variable: /^\$\w+$/,
12130
- 'interpolation-punctuation': {
12131
- pattern: /^\$\{|\}$/,
12132
- alias: 'punctuation'
12133
- },
12134
- expression: {
12135
- pattern: /[\s\S]+/,
12136
- inside: null // see below
12137
- }
12138
- }
12139
- },
12140
- string: /[\s\S]+/
12141
- }
12142
- },
12143
- keyword: /\b(?:else|if)\b/,
12144
- boolean: /\b(?:false|true)\b/,
12145
- 'builtin-function': {
12146
- // a few functions get special highlighting to improve readability
12147
- pattern:
12148
- /\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,
12149
- alias: 'keyword'
12150
- },
12151
- function: /\b[a-z_]\w*(?=\s*\()/i,
12152
- constant:
12153
- /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,
12154
- number: /-?\b\d+\b/,
12155
- operator: /[-+!=<>]=?|&&|\|\|/,
12156
- punctuation: /[(){}[\],.]/
12157
- };
12158
- Prism.languages.gn['string-literal'].inside['interpolation'].inside[
12159
- 'expression'
12160
- ].inside = Prism.languages.gn;
12161
- Prism.languages.gni = Prism.languages.gn;
12275
+ var gn_1;
12276
+ var hasRequiredGn;
12277
+
12278
+ function requireGn () {
12279
+ if (hasRequiredGn) return gn_1;
12280
+ hasRequiredGn = 1;
12281
+
12282
+ gn_1 = gn;
12283
+ gn.displayName = 'gn';
12284
+ gn.aliases = ['gni'];
12285
+ function gn(Prism) {
12286
+ // https://gn.googlesource.com/gn/+/refs/heads/main/docs/reference.md#grammar
12287
+ Prism.languages.gn = {
12288
+ comment: {
12289
+ pattern: /#.*/,
12290
+ greedy: true
12291
+ },
12292
+ 'string-literal': {
12293
+ pattern: /(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,
12294
+ lookbehind: true,
12295
+ greedy: true,
12296
+ inside: {
12297
+ interpolation: {
12298
+ pattern:
12299
+ /((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,
12300
+ lookbehind: true,
12301
+ inside: {
12302
+ number: /^\$0x[\s\S]{2}$/,
12303
+ variable: /^\$\w+$/,
12304
+ 'interpolation-punctuation': {
12305
+ pattern: /^\$\{|\}$/,
12306
+ alias: 'punctuation'
12307
+ },
12308
+ expression: {
12309
+ pattern: /[\s\S]+/,
12310
+ inside: null // see below
12311
+ }
12312
+ }
12313
+ },
12314
+ string: /[\s\S]+/
12315
+ }
12316
+ },
12317
+ keyword: /\b(?:else|if)\b/,
12318
+ boolean: /\b(?:false|true)\b/,
12319
+ 'builtin-function': {
12320
+ // a few functions get special highlighting to improve readability
12321
+ pattern:
12322
+ /\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,
12323
+ alias: 'keyword'
12324
+ },
12325
+ function: /\b[a-z_]\w*(?=\s*\()/i,
12326
+ constant:
12327
+ /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,
12328
+ number: /-?\b\d+\b/,
12329
+ operator: /[-+!=<>]=?|&&|\|\|/,
12330
+ punctuation: /[(){}[\],.]/
12331
+ };
12332
+ Prism.languages.gn['string-literal'].inside['interpolation'].inside[
12333
+ 'expression'
12334
+ ].inside = Prism.languages.gn;
12335
+ Prism.languages.gni = Prism.languages.gn;
12336
+ }
12337
+ return gn_1;
12162
12338
  }
12163
12339
 
12164
- var goModule_1 = goModule;
12165
- goModule.displayName = 'goModule';
12166
- goModule.aliases = [];
12167
- function goModule(Prism) {
12168
- // https://go.dev/ref/mod#go-mod-file-module
12169
- Prism.languages['go-mod'] = Prism.languages['go-module'] = {
12170
- comment: {
12171
- pattern: /\/\/.*/,
12172
- greedy: true
12173
- },
12174
- version: {
12175
- pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,
12176
- lookbehind: true,
12177
- alias: 'number'
12178
- },
12179
- 'go-version': {
12180
- pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,
12181
- lookbehind: true,
12182
- alias: 'number'
12183
- },
12184
- keyword: {
12185
- pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,
12186
- lookbehind: true
12187
- },
12188
- operator: /=>/,
12189
- punctuation: /[()[\],]/
12190
- };
12340
+ var goModule_1;
12341
+ var hasRequiredGoModule;
12342
+
12343
+ function requireGoModule () {
12344
+ if (hasRequiredGoModule) return goModule_1;
12345
+ hasRequiredGoModule = 1;
12346
+
12347
+ goModule_1 = goModule;
12348
+ goModule.displayName = 'goModule';
12349
+ goModule.aliases = [];
12350
+ function goModule(Prism) {
12351
+ // https://go.dev/ref/mod#go-mod-file-module
12352
+ Prism.languages['go-mod'] = Prism.languages['go-module'] = {
12353
+ comment: {
12354
+ pattern: /\/\/.*/,
12355
+ greedy: true
12356
+ },
12357
+ version: {
12358
+ pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,
12359
+ lookbehind: true,
12360
+ alias: 'number'
12361
+ },
12362
+ 'go-version': {
12363
+ pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,
12364
+ lookbehind: true,
12365
+ alias: 'number'
12366
+ },
12367
+ keyword: {
12368
+ pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,
12369
+ lookbehind: true
12370
+ },
12371
+ operator: /=>/,
12372
+ punctuation: /[()[\],]/
12373
+ };
12374
+ }
12375
+ return goModule_1;
12191
12376
  }
12192
12377
 
12193
12378
  var go_1;
@@ -27758,44 +27943,44 @@ refractor.register(cshtml_1);
27758
27943
  refractor.register(csp_1);
27759
27944
  refractor.register(cssExtras_1);
27760
27945
  refractor.register(csv_1);
27761
- refractor.register(cypher_1);
27946
+ refractor.register(requireCypher());
27762
27947
  refractor.register(d_1);
27763
- refractor.register(dart_1);
27948
+ refractor.register(requireDart());
27764
27949
  refractor.register(dataweave_1);
27765
27950
  refractor.register(dax_1);
27766
- refractor.register(requireDhall());
27951
+ refractor.register(dhall_1);
27767
27952
  refractor.register(diff_1);
27768
- refractor.register(django_1);
27953
+ refractor.register(requireDjango());
27769
27954
  refractor.register(dnsZoneFile_1);
27770
27955
  refractor.register(docker_1);
27771
- refractor.register(requireDot());
27956
+ refractor.register(dot_1);
27772
27957
  refractor.register(requireEbnf());
27773
27958
  refractor.register(editorconfig_1);
27774
- refractor.register(eiffel_1);
27775
- refractor.register(ejs_1);
27776
- refractor.register(elixir_1);
27777
- refractor.register(elm_1);
27778
- refractor.register(erb_1);
27779
- refractor.register(erlang_1);
27780
- refractor.register(etlua_1);
27781
- refractor.register(excelFormula_1);
27782
- refractor.register(factor_1);
27783
- refractor.register(_false);
27784
- refractor.register(firestoreSecurityRules_1);
27785
- refractor.register(flow_1);
27786
- refractor.register(fortran_1);
27787
- refractor.register(fsharp_1);
27959
+ refractor.register(requireEiffel());
27960
+ refractor.register(requireEjs());
27961
+ refractor.register(requireElixir());
27962
+ refractor.register(requireElm());
27963
+ refractor.register(requireErb());
27964
+ refractor.register(requireErlang());
27965
+ refractor.register(requireEtlua());
27966
+ refractor.register(requireExcelFormula());
27967
+ refractor.register(requireFactor());
27968
+ refractor.register(require_false());
27969
+ refractor.register(requireFirestoreSecurityRules());
27970
+ refractor.register(requireFlow());
27971
+ refractor.register(requireFortran());
27972
+ refractor.register(requireFsharp());
27788
27973
  refractor.register(requireFtl());
27789
27974
  refractor.register(requireGap());
27790
- refractor.register(gcode_1);
27791
- refractor.register(gdscript_1);
27792
- refractor.register(gedcom_1);
27975
+ refractor.register(requireGcode());
27976
+ refractor.register(requireGdscript());
27977
+ refractor.register(requireGedcom());
27793
27978
  refractor.register(requireGherkin());
27794
27979
  refractor.register(requireGit());
27795
27980
  refractor.register(requireGlsl());
27796
27981
  refractor.register(requireGml());
27797
- refractor.register(gn_1);
27798
- refractor.register(goModule_1);
27982
+ refractor.register(requireGn());
27983
+ refractor.register(requireGoModule());
27799
27984
  refractor.register(requireGo());
27800
27985
  refractor.register(requireGraphql());
27801
27986
  refractor.register(requireGroovy());
@@ -27850,7 +28035,7 @@ refractor.register(requireLivescript());
27850
28035
  refractor.register(requireLlvm());
27851
28036
  refractor.register(requireLog());
27852
28037
  refractor.register(requireLolcode());
27853
- refractor.register(lua_1);
28038
+ refractor.register(requireLua());
27854
28039
  refractor.register(requireMagma());
27855
28040
  refractor.register(requireMakefile());
27856
28041
  refractor.register(requireMarkdown());