@banyan_cloud/roots 1.0.110 → 1.0.111
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/cjs/index.js +1678 -1813
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1678 -1813
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +1678 -1813
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -20694,134 +20694,126 @@ function c(Prism) {
|
|
|
20694
20694
|
delete Prism.languages.c['boolean'];
|
|
20695
20695
|
}
|
|
20696
20696
|
|
|
20697
|
-
var
|
|
20698
|
-
var
|
|
20699
|
-
|
|
20700
|
-
|
|
20701
|
-
|
|
20702
|
-
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20712
|
-
|
|
20713
|
-
|
|
20714
|
-
|
|
20715
|
-
|
|
20716
|
-
|
|
20717
|
-
|
|
20718
|
-
|
|
20719
|
-
|
|
20720
|
-
|
|
20721
|
-
|
|
20722
|
-
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20732
|
-
|
|
20733
|
-
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20741
|
-
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20745
|
-
|
|
20746
|
-
|
|
20747
|
-
|
|
20748
|
-
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
|
|
20754
|
-
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
|
|
20758
|
-
|
|
20759
|
-
|
|
20760
|
-
|
|
20761
|
-
|
|
20762
|
-
|
|
20763
|
-
|
|
20764
|
-
|
|
20765
|
-
|
|
20766
|
-
|
|
20767
|
-
|
|
20768
|
-
|
|
20769
|
-
|
|
20770
|
-
|
|
20771
|
-
|
|
20772
|
-
|
|
20773
|
-
|
|
20774
|
-
|
|
20775
|
-
|
|
20776
|
-
|
|
20777
|
-
|
|
20778
|
-
|
|
20779
|
-
|
|
20780
|
-
|
|
20781
|
-
|
|
20782
|
-
|
|
20783
|
-
|
|
20784
|
-
|
|
20785
|
-
|
|
20786
|
-
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
20799
|
-
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
|
|
20807
|
-
|
|
20808
|
-
|
|
20809
|
-
|
|
20810
|
-
|
|
20811
|
-
|
|
20812
|
-
|
|
20813
|
-
|
|
20814
|
-
// All untokenized words that are not namespaces should be class names
|
|
20815
|
-
'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
|
|
20816
|
-
},
|
|
20817
|
-
Prism.languages.cpp['base-clause']
|
|
20818
|
-
);
|
|
20819
|
-
})(Prism);
|
|
20820
|
-
}
|
|
20821
|
-
return cpp_1;
|
|
20697
|
+
var refractorC$1 = c_1;
|
|
20698
|
+
var cpp_1 = cpp;
|
|
20699
|
+
cpp.displayName = 'cpp';
|
|
20700
|
+
cpp.aliases = [];
|
|
20701
|
+
function cpp(Prism) {
|
|
20702
|
+
Prism.register(refractorC$1)
|
|
20703
|
+
;(function (Prism) {
|
|
20704
|
+
var keyword =
|
|
20705
|
+
/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
|
|
20706
|
+
var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
|
|
20707
|
+
/<keyword>/g,
|
|
20708
|
+
function () {
|
|
20709
|
+
return keyword.source
|
|
20710
|
+
}
|
|
20711
|
+
);
|
|
20712
|
+
Prism.languages.cpp = Prism.languages.extend('c', {
|
|
20713
|
+
'class-name': [
|
|
20714
|
+
{
|
|
20715
|
+
pattern: RegExp(
|
|
20716
|
+
/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
|
|
20717
|
+
/<keyword>/g,
|
|
20718
|
+
function () {
|
|
20719
|
+
return keyword.source
|
|
20720
|
+
}
|
|
20721
|
+
)
|
|
20722
|
+
),
|
|
20723
|
+
lookbehind: true
|
|
20724
|
+
}, // This is intended to capture the class name of method implementations like:
|
|
20725
|
+
// void foo::bar() const {}
|
|
20726
|
+
// However! The `foo` in the above example could also be a namespace, so we only capture the class name if
|
|
20727
|
+
// it starts with an uppercase letter. This approximation should give decent results.
|
|
20728
|
+
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
|
|
20729
|
+
// Foo::~Foo() {}
|
|
20730
|
+
/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, // This also intends to capture the class name of method implementations but here the class has template
|
|
20731
|
+
// parameters, so it can't be a namespace (until C++ adds generic namespaces).
|
|
20732
|
+
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
|
20733
|
+
],
|
|
20734
|
+
keyword: keyword,
|
|
20735
|
+
number: {
|
|
20736
|
+
pattern:
|
|
20737
|
+
/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
|
20738
|
+
greedy: true
|
|
20739
|
+
},
|
|
20740
|
+
operator:
|
|
20741
|
+
/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
|
20742
|
+
boolean: /\b(?:false|true)\b/
|
|
20743
|
+
});
|
|
20744
|
+
Prism.languages.insertBefore('cpp', 'string', {
|
|
20745
|
+
module: {
|
|
20746
|
+
// https://en.cppreference.com/w/cpp/language/modules
|
|
20747
|
+
pattern: RegExp(
|
|
20748
|
+
/(\b(?:import|module)\s+)/.source +
|
|
20749
|
+
'(?:' + // header-name
|
|
20750
|
+
/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
|
|
20751
|
+
'|' + // module name or partition or both
|
|
20752
|
+
/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
|
|
20753
|
+
/<mod-name>/g,
|
|
20754
|
+
function () {
|
|
20755
|
+
return modName
|
|
20756
|
+
}
|
|
20757
|
+
) +
|
|
20758
|
+
')'
|
|
20759
|
+
),
|
|
20760
|
+
lookbehind: true,
|
|
20761
|
+
greedy: true,
|
|
20762
|
+
inside: {
|
|
20763
|
+
string: /^[<"][\s\S]+/,
|
|
20764
|
+
operator: /:/,
|
|
20765
|
+
punctuation: /\./
|
|
20766
|
+
}
|
|
20767
|
+
},
|
|
20768
|
+
'raw-string': {
|
|
20769
|
+
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
|
20770
|
+
alias: 'string',
|
|
20771
|
+
greedy: true
|
|
20772
|
+
}
|
|
20773
|
+
});
|
|
20774
|
+
Prism.languages.insertBefore('cpp', 'keyword', {
|
|
20775
|
+
'generic-function': {
|
|
20776
|
+
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
|
20777
|
+
inside: {
|
|
20778
|
+
function: /^\w+/,
|
|
20779
|
+
generic: {
|
|
20780
|
+
pattern: /<[\s\S]+/,
|
|
20781
|
+
alias: 'class-name',
|
|
20782
|
+
inside: Prism.languages.cpp
|
|
20783
|
+
}
|
|
20784
|
+
}
|
|
20785
|
+
}
|
|
20786
|
+
});
|
|
20787
|
+
Prism.languages.insertBefore('cpp', 'operator', {
|
|
20788
|
+
'double-colon': {
|
|
20789
|
+
pattern: /::/,
|
|
20790
|
+
alias: 'punctuation'
|
|
20791
|
+
}
|
|
20792
|
+
});
|
|
20793
|
+
Prism.languages.insertBefore('cpp', 'class-name', {
|
|
20794
|
+
// the base clause is an optional list of parent classes
|
|
20795
|
+
// https://en.cppreference.com/w/cpp/language/class
|
|
20796
|
+
'base-clause': {
|
|
20797
|
+
pattern:
|
|
20798
|
+
/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
|
20799
|
+
lookbehind: true,
|
|
20800
|
+
greedy: true,
|
|
20801
|
+
inside: Prism.languages.extend('cpp', {})
|
|
20802
|
+
}
|
|
20803
|
+
});
|
|
20804
|
+
Prism.languages.insertBefore(
|
|
20805
|
+
'inside',
|
|
20806
|
+
'double-colon',
|
|
20807
|
+
{
|
|
20808
|
+
// All untokenized words that are not namespaces should be class names
|
|
20809
|
+
'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
|
|
20810
|
+
},
|
|
20811
|
+
Prism.languages.cpp['base-clause']
|
|
20812
|
+
);
|
|
20813
|
+
})(Prism);
|
|
20822
20814
|
}
|
|
20823
20815
|
|
|
20824
|
-
var refractorCpp$1 =
|
|
20816
|
+
var refractorCpp$1 = cpp_1;
|
|
20825
20817
|
var arduino_1 = arduino;
|
|
20826
20818
|
arduino.displayName = 'arduino';
|
|
20827
20819
|
arduino.aliases = ['ino'];
|
|
@@ -21165,484 +21157,475 @@ function asmatmel(Prism) {
|
|
|
21165
21157
|
};
|
|
21166
21158
|
}
|
|
21167
21159
|
|
|
21168
|
-
var csharp_1;
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
function
|
|
21172
|
-
if (hasRequiredCsharp) return csharp_1;
|
|
21173
|
-
hasRequiredCsharp = 1;
|
|
21174
|
-
|
|
21175
|
-
csharp_1 = csharp;
|
|
21176
|
-
csharp.displayName = 'csharp';
|
|
21177
|
-
csharp.aliases = ['dotnet', 'cs'];
|
|
21178
|
-
function csharp(Prism) {
|
|
21160
|
+
var csharp_1 = csharp;
|
|
21161
|
+
csharp.displayName = 'csharp';
|
|
21162
|
+
csharp.aliases = ['dotnet', 'cs'];
|
|
21163
|
+
function csharp(Prism) {
|
|
21179
21164
|
(function (Prism) {
|
|
21180
|
-
|
|
21181
|
-
|
|
21182
|
-
|
|
21183
|
-
|
|
21184
|
-
|
|
21185
|
-
|
|
21186
|
-
|
|
21187
|
-
|
|
21188
|
-
|
|
21189
|
-
|
|
21190
|
-
|
|
21191
|
-
|
|
21192
|
-
|
|
21193
|
-
|
|
21194
|
-
|
|
21195
|
-
|
|
21196
|
-
|
|
21197
|
-
|
|
21198
|
-
|
|
21199
|
-
|
|
21200
|
-
|
|
21201
|
-
|
|
21202
|
-
|
|
21203
|
-
|
|
21204
|
-
|
|
21205
|
-
|
|
21206
|
-
|
|
21207
|
-
|
|
21208
|
-
|
|
21209
|
-
|
|
21210
|
-
|
|
21211
|
-
|
|
21212
|
-
|
|
21213
|
-
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21219
|
-
|
|
21220
|
-
|
|
21221
|
-
|
|
21222
|
-
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
|
|
21227
|
-
|
|
21228
|
-
|
|
21229
|
-
|
|
21230
|
-
|
|
21231
|
-
|
|
21232
|
-
|
|
21233
|
-
|
|
21234
|
-
|
|
21235
|
-
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
|
|
21239
|
-
|
|
21240
|
-
|
|
21241
|
-
|
|
21242
|
-
|
|
21243
|
-
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21248
|
-
|
|
21249
|
-
|
|
21250
|
-
|
|
21251
|
-
|
|
21252
|
-
|
|
21253
|
-
|
|
21254
|
-
|
|
21255
|
-
|
|
21256
|
-
|
|
21257
|
-
|
|
21258
|
-
|
|
21259
|
-
|
|
21260
|
-
|
|
21261
|
-
|
|
21262
|
-
|
|
21263
|
-
|
|
21264
|
-
|
|
21265
|
-
|
|
21266
|
-
|
|
21267
|
-
|
|
21268
|
-
|
|
21269
|
-
|
|
21270
|
-
|
|
21271
|
-
|
|
21272
|
-
|
|
21273
|
-
|
|
21274
|
-
|
|
21275
|
-
|
|
21276
|
-
|
|
21277
|
-
|
|
21278
|
-
|
|
21279
|
-
|
|
21280
|
-
|
|
21281
|
-
|
|
21282
|
-
|
|
21283
|
-
|
|
21284
|
-
|
|
21285
|
-
|
|
21286
|
-
|
|
21287
|
-
|
|
21288
|
-
|
|
21289
|
-
|
|
21290
|
-
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
|
|
21304
|
-
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
|
|
21326
|
-
|
|
21327
|
-
|
|
21328
|
-
|
|
21329
|
-
|
|
21330
|
-
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21335
|
-
|
|
21336
|
-
|
|
21337
|
-
|
|
21338
|
-
|
|
21339
|
-
|
|
21340
|
-
|
|
21341
|
-
|
|
21342
|
-
|
|
21343
|
-
|
|
21344
|
-
|
|
21345
|
-
|
|
21346
|
-
|
|
21347
|
-
|
|
21348
|
-
|
|
21349
|
-
|
|
21350
|
-
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21361
|
-
|
|
21362
|
-
|
|
21363
|
-
|
|
21364
|
-
|
|
21365
|
-
|
|
21366
|
-
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
|
|
21371
|
-
|
|
21372
|
-
|
|
21373
|
-
|
|
21374
|
-
|
|
21375
|
-
|
|
21376
|
-
|
|
21377
|
-
|
|
21378
|
-
|
|
21379
|
-
|
|
21380
|
-
|
|
21381
|
-
|
|
21382
|
-
|
|
21383
|
-
|
|
21384
|
-
|
|
21385
|
-
|
|
21386
|
-
|
|
21387
|
-
|
|
21388
|
-
|
|
21389
|
-
|
|
21390
|
-
|
|
21391
|
-
|
|
21392
|
-
|
|
21393
|
-
|
|
21394
|
-
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21398
|
-
|
|
21399
|
-
|
|
21400
|
-
|
|
21401
|
-
|
|
21402
|
-
|
|
21403
|
-
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21408
|
-
|
|
21409
|
-
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
|
|
21426
|
-
|
|
21427
|
-
|
|
21428
|
-
|
|
21429
|
-
|
|
21430
|
-
|
|
21431
|
-
|
|
21432
|
-
|
|
21433
|
-
|
|
21434
|
-
|
|
21435
|
-
|
|
21436
|
-
|
|
21437
|
-
|
|
21438
|
-
|
|
21439
|
-
|
|
21440
|
-
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21446
|
-
|
|
21447
|
-
|
|
21448
|
-
|
|
21449
|
-
|
|
21450
|
-
|
|
21451
|
-
|
|
21452
|
-
|
|
21453
|
-
|
|
21454
|
-
|
|
21455
|
-
|
|
21456
|
-
|
|
21457
|
-
|
|
21458
|
-
|
|
21459
|
-
|
|
21460
|
-
|
|
21461
|
-
|
|
21462
|
-
|
|
21463
|
-
|
|
21464
|
-
|
|
21465
|
-
|
|
21466
|
-
|
|
21467
|
-
|
|
21468
|
-
|
|
21469
|
-
|
|
21470
|
-
|
|
21471
|
-
|
|
21472
|
-
|
|
21473
|
-
|
|
21474
|
-
|
|
21475
|
-
|
|
21476
|
-
|
|
21477
|
-
|
|
21478
|
-
|
|
21479
|
-
|
|
21480
|
-
|
|
21481
|
-
|
|
21482
|
-
|
|
21483
|
-
|
|
21484
|
-
|
|
21485
|
-
|
|
21486
|
-
|
|
21487
|
-
|
|
21488
|
-
|
|
21489
|
-
|
|
21490
|
-
|
|
21491
|
-
|
|
21492
|
-
|
|
21493
|
-
|
|
21494
|
-
|
|
21495
|
-
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
|
|
21502
|
-
|
|
21503
|
-
|
|
21504
|
-
|
|
21505
|
-
|
|
21506
|
-
|
|
21507
|
-
|
|
21508
|
-
|
|
21509
|
-
|
|
21510
|
-
|
|
21511
|
-
|
|
21512
|
-
|
|
21513
|
-
|
|
21514
|
-
|
|
21515
|
-
|
|
21516
|
-
|
|
21517
|
-
|
|
21518
|
-
|
|
21519
|
-
|
|
21520
|
-
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
|
|
21528
|
-
|
|
21529
|
-
|
|
21530
|
-
|
|
21531
|
-
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21535
|
-
|
|
21536
|
-
|
|
21537
|
-
|
|
21538
|
-
|
|
21539
|
-
|
|
21540
|
-
|
|
21541
|
-
|
|
21542
|
-
|
|
21543
|
-
|
|
21544
|
-
|
|
21545
|
-
|
|
21546
|
-
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
|
|
21550
|
-
|
|
21551
|
-
|
|
21552
|
-
|
|
21553
|
-
|
|
21554
|
-
|
|
21555
|
-
|
|
21556
|
-
|
|
21557
|
-
|
|
21558
|
-
|
|
21559
|
-
|
|
21560
|
-
|
|
21561
|
-
|
|
21562
|
-
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
|
|
21566
|
-
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
21571
|
-
|
|
21572
|
-
|
|
21573
|
-
|
|
21574
|
-
|
|
21575
|
-
|
|
21576
|
-
|
|
21577
|
-
|
|
21578
|
-
|
|
21579
|
-
|
|
21580
|
-
|
|
21581
|
-
|
|
21582
|
-
|
|
21583
|
-
|
|
21584
|
-
|
|
21585
|
-
|
|
21586
|
-
|
|
21587
|
-
|
|
21588
|
-
|
|
21589
|
-
|
|
21590
|
-
|
|
21591
|
-
|
|
21592
|
-
|
|
21593
|
-
|
|
21594
|
-
|
|
21595
|
-
|
|
21596
|
-
|
|
21597
|
-
|
|
21598
|
-
|
|
21599
|
-
|
|
21600
|
-
|
|
21601
|
-
|
|
21602
|
-
|
|
21603
|
-
|
|
21604
|
-
|
|
21605
|
-
|
|
21606
|
-
|
|
21607
|
-
|
|
21608
|
-
|
|
21609
|
-
|
|
21610
|
-
|
|
21611
|
-
|
|
21612
|
-
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
|
|
21623
|
-
|
|
21624
|
-
|
|
21625
|
-
|
|
21626
|
-
|
|
21627
|
-
|
|
21628
|
-
|
|
21629
|
-
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
}
|
|
21637
|
-
return csharp_1;
|
|
21165
|
+
/**
|
|
21166
|
+
* Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
|
|
21167
|
+
*
|
|
21168
|
+
* Note: This is a simple text based replacement. Be careful when using backreferences!
|
|
21169
|
+
*
|
|
21170
|
+
* @param {string} pattern the given pattern.
|
|
21171
|
+
* @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
|
|
21172
|
+
* @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
|
|
21173
|
+
* @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
|
|
21174
|
+
*/
|
|
21175
|
+
function replace(pattern, replacements) {
|
|
21176
|
+
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
|
21177
|
+
return '(?:' + replacements[+index] + ')'
|
|
21178
|
+
})
|
|
21179
|
+
}
|
|
21180
|
+
/**
|
|
21181
|
+
* @param {string} pattern
|
|
21182
|
+
* @param {string[]} replacements
|
|
21183
|
+
* @param {string} [flags]
|
|
21184
|
+
* @returns {RegExp}
|
|
21185
|
+
*/
|
|
21186
|
+
function re(pattern, replacements, flags) {
|
|
21187
|
+
return RegExp(replace(pattern, replacements), flags || '')
|
|
21188
|
+
}
|
|
21189
|
+
/**
|
|
21190
|
+
* Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
|
|
21191
|
+
*
|
|
21192
|
+
* @param {string} pattern
|
|
21193
|
+
* @param {number} depthLog2
|
|
21194
|
+
* @returns {string}
|
|
21195
|
+
*/
|
|
21196
|
+
function nested(pattern, depthLog2) {
|
|
21197
|
+
for (var i = 0; i < depthLog2; i++) {
|
|
21198
|
+
pattern = pattern.replace(/<<self>>/g, function () {
|
|
21199
|
+
return '(?:' + pattern + ')'
|
|
21200
|
+
});
|
|
21201
|
+
}
|
|
21202
|
+
return pattern.replace(/<<self>>/g, '[^\\s\\S]')
|
|
21203
|
+
} // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
|
|
21204
|
+
var keywordKinds = {
|
|
21205
|
+
// keywords which represent a return or variable type
|
|
21206
|
+
type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
|
|
21207
|
+
// keywords which are used to declare a type
|
|
21208
|
+
typeDeclaration: 'class enum interface record struct',
|
|
21209
|
+
// contextual keywords
|
|
21210
|
+
// ("var" and "dynamic" are missing because they are used like types)
|
|
21211
|
+
contextual:
|
|
21212
|
+
'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)',
|
|
21213
|
+
// all other keywords
|
|
21214
|
+
other:
|
|
21215
|
+
'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
|
|
21216
|
+
}; // keywords
|
|
21217
|
+
function keywordsToPattern(words) {
|
|
21218
|
+
return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
|
|
21219
|
+
}
|
|
21220
|
+
var typeDeclarationKeywords = keywordsToPattern(
|
|
21221
|
+
keywordKinds.typeDeclaration
|
|
21222
|
+
);
|
|
21223
|
+
var keywords = RegExp(
|
|
21224
|
+
keywordsToPattern(
|
|
21225
|
+
keywordKinds.type +
|
|
21226
|
+
' ' +
|
|
21227
|
+
keywordKinds.typeDeclaration +
|
|
21228
|
+
' ' +
|
|
21229
|
+
keywordKinds.contextual +
|
|
21230
|
+
' ' +
|
|
21231
|
+
keywordKinds.other
|
|
21232
|
+
)
|
|
21233
|
+
);
|
|
21234
|
+
var nonTypeKeywords = keywordsToPattern(
|
|
21235
|
+
keywordKinds.typeDeclaration +
|
|
21236
|
+
' ' +
|
|
21237
|
+
keywordKinds.contextual +
|
|
21238
|
+
' ' +
|
|
21239
|
+
keywordKinds.other
|
|
21240
|
+
);
|
|
21241
|
+
var nonContextualKeywords = keywordsToPattern(
|
|
21242
|
+
keywordKinds.type +
|
|
21243
|
+
' ' +
|
|
21244
|
+
keywordKinds.typeDeclaration +
|
|
21245
|
+
' ' +
|
|
21246
|
+
keywordKinds.other
|
|
21247
|
+
); // types
|
|
21248
|
+
var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
|
|
21249
|
+
var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
|
|
21250
|
+
var name = /@?\b[A-Za-z_]\w*\b/.source;
|
|
21251
|
+
var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
|
|
21252
|
+
var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
|
|
21253
|
+
nonTypeKeywords,
|
|
21254
|
+
genericName
|
|
21255
|
+
]);
|
|
21256
|
+
var array = /\[\s*(?:,\s*)*\]/.source;
|
|
21257
|
+
var typeExpressionWithoutTuple = replace(
|
|
21258
|
+
/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
|
|
21259
|
+
[identifier, array]
|
|
21260
|
+
);
|
|
21261
|
+
var tupleElement = replace(
|
|
21262
|
+
/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
|
|
21263
|
+
[generic, nestedRound, array]
|
|
21264
|
+
);
|
|
21265
|
+
var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
|
|
21266
|
+
var typeExpression = replace(
|
|
21267
|
+
/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
|
|
21268
|
+
[tuple, identifier, array]
|
|
21269
|
+
);
|
|
21270
|
+
var typeInside = {
|
|
21271
|
+
keyword: keywords,
|
|
21272
|
+
punctuation: /[<>()?,.:[\]]/
|
|
21273
|
+
}; // strings & characters
|
|
21274
|
+
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
|
|
21275
|
+
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
|
|
21276
|
+
var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
|
|
21277
|
+
var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
|
|
21278
|
+
var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
|
|
21279
|
+
Prism.languages.csharp = Prism.languages.extend('clike', {
|
|
21280
|
+
string: [
|
|
21281
|
+
{
|
|
21282
|
+
pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
|
|
21283
|
+
lookbehind: true,
|
|
21284
|
+
greedy: true
|
|
21285
|
+
},
|
|
21286
|
+
{
|
|
21287
|
+
pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
|
|
21288
|
+
lookbehind: true,
|
|
21289
|
+
greedy: true
|
|
21290
|
+
}
|
|
21291
|
+
],
|
|
21292
|
+
'class-name': [
|
|
21293
|
+
{
|
|
21294
|
+
// Using static
|
|
21295
|
+
// using static System.Math;
|
|
21296
|
+
pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
|
|
21297
|
+
identifier
|
|
21298
|
+
]),
|
|
21299
|
+
lookbehind: true,
|
|
21300
|
+
inside: typeInside
|
|
21301
|
+
},
|
|
21302
|
+
{
|
|
21303
|
+
// Using alias (type)
|
|
21304
|
+
// using Project = PC.MyCompany.Project;
|
|
21305
|
+
pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
|
|
21306
|
+
name,
|
|
21307
|
+
typeExpression
|
|
21308
|
+
]),
|
|
21309
|
+
lookbehind: true,
|
|
21310
|
+
inside: typeInside
|
|
21311
|
+
},
|
|
21312
|
+
{
|
|
21313
|
+
// Using alias (alias)
|
|
21314
|
+
// using Project = PC.MyCompany.Project;
|
|
21315
|
+
pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
|
|
21316
|
+
lookbehind: true
|
|
21317
|
+
},
|
|
21318
|
+
{
|
|
21319
|
+
// Type declarations
|
|
21320
|
+
// class Foo<A, B>
|
|
21321
|
+
// interface Foo<out A, B>
|
|
21322
|
+
pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
|
|
21323
|
+
typeDeclarationKeywords,
|
|
21324
|
+
genericName
|
|
21325
|
+
]),
|
|
21326
|
+
lookbehind: true,
|
|
21327
|
+
inside: typeInside
|
|
21328
|
+
},
|
|
21329
|
+
{
|
|
21330
|
+
// Single catch exception declaration
|
|
21331
|
+
// catch(Foo)
|
|
21332
|
+
// (things like catch(Foo e) is covered by variable declaration)
|
|
21333
|
+
pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
|
|
21334
|
+
lookbehind: true,
|
|
21335
|
+
inside: typeInside
|
|
21336
|
+
},
|
|
21337
|
+
{
|
|
21338
|
+
// Name of the type parameter of generic constraints
|
|
21339
|
+
// where Foo : class
|
|
21340
|
+
pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
|
|
21341
|
+
lookbehind: true
|
|
21342
|
+
},
|
|
21343
|
+
{
|
|
21344
|
+
// Casts and checks via as and is.
|
|
21345
|
+
// as Foo<A>, is Bar<B>
|
|
21346
|
+
// (things like if(a is Foo b) is covered by variable declaration)
|
|
21347
|
+
pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
|
|
21348
|
+
typeExpressionWithoutTuple
|
|
21349
|
+
]),
|
|
21350
|
+
lookbehind: true,
|
|
21351
|
+
inside: typeInside
|
|
21352
|
+
},
|
|
21353
|
+
{
|
|
21354
|
+
// Variable, field and parameter declaration
|
|
21355
|
+
// (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
|
|
21356
|
+
pattern: re(
|
|
21357
|
+
/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
|
|
21358
|
+
.source,
|
|
21359
|
+
[typeExpression, nonContextualKeywords, name]
|
|
21360
|
+
),
|
|
21361
|
+
inside: typeInside
|
|
21362
|
+
}
|
|
21363
|
+
],
|
|
21364
|
+
keyword: keywords,
|
|
21365
|
+
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
|
|
21366
|
+
number:
|
|
21367
|
+
/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,
|
|
21368
|
+
operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
|
|
21369
|
+
punctuation: /\?\.?|::|[{}[\];(),.:]/
|
|
21370
|
+
});
|
|
21371
|
+
Prism.languages.insertBefore('csharp', 'number', {
|
|
21372
|
+
range: {
|
|
21373
|
+
pattern: /\.\./,
|
|
21374
|
+
alias: 'operator'
|
|
21375
|
+
}
|
|
21376
|
+
});
|
|
21377
|
+
Prism.languages.insertBefore('csharp', 'punctuation', {
|
|
21378
|
+
'named-parameter': {
|
|
21379
|
+
pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
|
|
21380
|
+
lookbehind: true,
|
|
21381
|
+
alias: 'punctuation'
|
|
21382
|
+
}
|
|
21383
|
+
});
|
|
21384
|
+
Prism.languages.insertBefore('csharp', 'class-name', {
|
|
21385
|
+
namespace: {
|
|
21386
|
+
// namespace Foo.Bar {}
|
|
21387
|
+
// using Foo.Bar;
|
|
21388
|
+
pattern: re(
|
|
21389
|
+
/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
|
|
21390
|
+
[name]
|
|
21391
|
+
),
|
|
21392
|
+
lookbehind: true,
|
|
21393
|
+
inside: {
|
|
21394
|
+
punctuation: /\./
|
|
21395
|
+
}
|
|
21396
|
+
},
|
|
21397
|
+
'type-expression': {
|
|
21398
|
+
// default(Foo), typeof(Foo<Bar>), sizeof(int)
|
|
21399
|
+
pattern: re(
|
|
21400
|
+
/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
|
|
21401
|
+
.source,
|
|
21402
|
+
[nestedRound]
|
|
21403
|
+
),
|
|
21404
|
+
lookbehind: true,
|
|
21405
|
+
alias: 'class-name',
|
|
21406
|
+
inside: typeInside
|
|
21407
|
+
},
|
|
21408
|
+
'return-type': {
|
|
21409
|
+
// Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
|
|
21410
|
+
// int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
|
|
21411
|
+
// int Foo => 0; int Foo { get; set } = 0;
|
|
21412
|
+
pattern: re(
|
|
21413
|
+
/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
|
|
21414
|
+
[typeExpression, identifier]
|
|
21415
|
+
),
|
|
21416
|
+
inside: typeInside,
|
|
21417
|
+
alias: 'class-name'
|
|
21418
|
+
},
|
|
21419
|
+
'constructor-invocation': {
|
|
21420
|
+
// new List<Foo<Bar[]>> { }
|
|
21421
|
+
pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
|
|
21422
|
+
lookbehind: true,
|
|
21423
|
+
inside: typeInside,
|
|
21424
|
+
alias: 'class-name'
|
|
21425
|
+
},
|
|
21426
|
+
/*'explicit-implementation': {
|
|
21427
|
+
// int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
|
|
21428
|
+
pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
|
|
21429
|
+
inside: classNameInside,
|
|
21430
|
+
alias: 'class-name'
|
|
21431
|
+
},*/
|
|
21432
|
+
'generic-method': {
|
|
21433
|
+
// foo<Bar>()
|
|
21434
|
+
pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
|
|
21435
|
+
inside: {
|
|
21436
|
+
function: re(/^<<0>>/.source, [name]),
|
|
21437
|
+
generic: {
|
|
21438
|
+
pattern: RegExp(generic),
|
|
21439
|
+
alias: 'class-name',
|
|
21440
|
+
inside: typeInside
|
|
21441
|
+
}
|
|
21442
|
+
}
|
|
21443
|
+
},
|
|
21444
|
+
'type-list': {
|
|
21445
|
+
// The list of types inherited or of generic constraints
|
|
21446
|
+
// class Foo<F> : Bar, IList<FooBar>
|
|
21447
|
+
// where F : Bar, IList<int>
|
|
21448
|
+
pattern: re(
|
|
21449
|
+
/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/
|
|
21450
|
+
.source,
|
|
21451
|
+
[
|
|
21452
|
+
typeDeclarationKeywords,
|
|
21453
|
+
genericName,
|
|
21454
|
+
name,
|
|
21455
|
+
typeExpression,
|
|
21456
|
+
keywords.source,
|
|
21457
|
+
nestedRound,
|
|
21458
|
+
/\bnew\s*\(\s*\)/.source
|
|
21459
|
+
]
|
|
21460
|
+
),
|
|
21461
|
+
lookbehind: true,
|
|
21462
|
+
inside: {
|
|
21463
|
+
'record-arguments': {
|
|
21464
|
+
pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
|
|
21465
|
+
genericName,
|
|
21466
|
+
nestedRound
|
|
21467
|
+
]),
|
|
21468
|
+
lookbehind: true,
|
|
21469
|
+
greedy: true,
|
|
21470
|
+
inside: Prism.languages.csharp
|
|
21471
|
+
},
|
|
21472
|
+
keyword: keywords,
|
|
21473
|
+
'class-name': {
|
|
21474
|
+
pattern: RegExp(typeExpression),
|
|
21475
|
+
greedy: true,
|
|
21476
|
+
inside: typeInside
|
|
21477
|
+
},
|
|
21478
|
+
punctuation: /[,()]/
|
|
21479
|
+
}
|
|
21480
|
+
},
|
|
21481
|
+
preprocessor: {
|
|
21482
|
+
pattern: /(^[\t ]*)#.*/m,
|
|
21483
|
+
lookbehind: true,
|
|
21484
|
+
alias: 'property',
|
|
21485
|
+
inside: {
|
|
21486
|
+
// highlight preprocessor directives as keywords
|
|
21487
|
+
directive: {
|
|
21488
|
+
pattern:
|
|
21489
|
+
/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
|
|
21490
|
+
lookbehind: true,
|
|
21491
|
+
alias: 'keyword'
|
|
21492
|
+
}
|
|
21493
|
+
}
|
|
21494
|
+
}
|
|
21495
|
+
}); // attributes
|
|
21496
|
+
var regularStringOrCharacter = regularString + '|' + character;
|
|
21497
|
+
var regularStringCharacterOrComment = replace(
|
|
21498
|
+
/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
|
|
21499
|
+
[regularStringOrCharacter]
|
|
21500
|
+
);
|
|
21501
|
+
var roundExpression = nested(
|
|
21502
|
+
replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
|
|
21503
|
+
regularStringCharacterOrComment
|
|
21504
|
+
]),
|
|
21505
|
+
2
|
|
21506
|
+
); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
|
|
21507
|
+
var attrTarget =
|
|
21508
|
+
/\b(?:assembly|event|field|method|module|param|property|return|type)\b/
|
|
21509
|
+
.source;
|
|
21510
|
+
var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
|
|
21511
|
+
identifier,
|
|
21512
|
+
roundExpression
|
|
21513
|
+
]);
|
|
21514
|
+
Prism.languages.insertBefore('csharp', 'class-name', {
|
|
21515
|
+
attribute: {
|
|
21516
|
+
// Attributes
|
|
21517
|
+
// [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
|
|
21518
|
+
pattern: re(
|
|
21519
|
+
/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
|
|
21520
|
+
.source,
|
|
21521
|
+
[attrTarget, attr]
|
|
21522
|
+
),
|
|
21523
|
+
lookbehind: true,
|
|
21524
|
+
greedy: true,
|
|
21525
|
+
inside: {
|
|
21526
|
+
target: {
|
|
21527
|
+
pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
|
|
21528
|
+
alias: 'keyword'
|
|
21529
|
+
},
|
|
21530
|
+
'attribute-arguments': {
|
|
21531
|
+
pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
|
|
21532
|
+
inside: Prism.languages.csharp
|
|
21533
|
+
},
|
|
21534
|
+
'class-name': {
|
|
21535
|
+
pattern: RegExp(identifier),
|
|
21536
|
+
inside: {
|
|
21537
|
+
punctuation: /\./
|
|
21538
|
+
}
|
|
21539
|
+
},
|
|
21540
|
+
punctuation: /[:,]/
|
|
21541
|
+
}
|
|
21542
|
+
}
|
|
21543
|
+
}); // string interpolation
|
|
21544
|
+
var formatString = /:[^}\r\n]+/.source; // multi line
|
|
21545
|
+
var mInterpolationRound = nested(
|
|
21546
|
+
replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
|
|
21547
|
+
regularStringCharacterOrComment
|
|
21548
|
+
]),
|
|
21549
|
+
2
|
|
21550
|
+
);
|
|
21551
|
+
var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
|
|
21552
|
+
mInterpolationRound,
|
|
21553
|
+
formatString
|
|
21554
|
+
]); // single line
|
|
21555
|
+
var sInterpolationRound = nested(
|
|
21556
|
+
replace(
|
|
21557
|
+
/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
|
|
21558
|
+
.source,
|
|
21559
|
+
[regularStringOrCharacter]
|
|
21560
|
+
),
|
|
21561
|
+
2
|
|
21562
|
+
);
|
|
21563
|
+
var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
|
|
21564
|
+
sInterpolationRound,
|
|
21565
|
+
formatString
|
|
21566
|
+
]);
|
|
21567
|
+
function createInterpolationInside(interpolation, interpolationRound) {
|
|
21568
|
+
return {
|
|
21569
|
+
interpolation: {
|
|
21570
|
+
pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
|
|
21571
|
+
lookbehind: true,
|
|
21572
|
+
inside: {
|
|
21573
|
+
'format-string': {
|
|
21574
|
+
pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
|
|
21575
|
+
interpolationRound,
|
|
21576
|
+
formatString
|
|
21577
|
+
]),
|
|
21578
|
+
lookbehind: true,
|
|
21579
|
+
inside: {
|
|
21580
|
+
punctuation: /^:/
|
|
21581
|
+
}
|
|
21582
|
+
},
|
|
21583
|
+
punctuation: /^\{|\}$/,
|
|
21584
|
+
expression: {
|
|
21585
|
+
pattern: /[\s\S]+/,
|
|
21586
|
+
alias: 'language-csharp',
|
|
21587
|
+
inside: Prism.languages.csharp
|
|
21588
|
+
}
|
|
21589
|
+
}
|
|
21590
|
+
},
|
|
21591
|
+
string: /[\s\S]+/
|
|
21592
|
+
}
|
|
21593
|
+
}
|
|
21594
|
+
Prism.languages.insertBefore('csharp', 'string', {
|
|
21595
|
+
'interpolation-string': [
|
|
21596
|
+
{
|
|
21597
|
+
pattern: re(
|
|
21598
|
+
/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
|
|
21599
|
+
[mInterpolation]
|
|
21600
|
+
),
|
|
21601
|
+
lookbehind: true,
|
|
21602
|
+
greedy: true,
|
|
21603
|
+
inside: createInterpolationInside(mInterpolation, mInterpolationRound)
|
|
21604
|
+
},
|
|
21605
|
+
{
|
|
21606
|
+
pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
|
|
21607
|
+
sInterpolation
|
|
21608
|
+
]),
|
|
21609
|
+
lookbehind: true,
|
|
21610
|
+
greedy: true,
|
|
21611
|
+
inside: createInterpolationInside(sInterpolation, sInterpolationRound)
|
|
21612
|
+
}
|
|
21613
|
+
],
|
|
21614
|
+
char: {
|
|
21615
|
+
pattern: RegExp(character),
|
|
21616
|
+
greedy: true
|
|
21617
|
+
}
|
|
21618
|
+
});
|
|
21619
|
+
Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
|
|
21620
|
+
})(Prism);
|
|
21638
21621
|
}
|
|
21639
21622
|
|
|
21640
|
-
var refractorCsharp =
|
|
21623
|
+
var refractorCsharp$1 = csharp_1;
|
|
21641
21624
|
var aspnet_1 = aspnet;
|
|
21642
21625
|
aspnet.displayName = 'aspnet';
|
|
21643
21626
|
aspnet.aliases = [];
|
|
21644
21627
|
function aspnet(Prism) {
|
|
21645
|
-
Prism.register(refractorCsharp);
|
|
21628
|
+
Prism.register(refractorCsharp$1);
|
|
21646
21629
|
Prism.languages.aspnet = Prism.languages.extend('markup', {
|
|
21647
21630
|
'page-directive': {
|
|
21648
21631
|
pattern: /<%\s*@.*%>/,
|
|
@@ -22831,7 +22814,7 @@ function cfscript(Prism) {
|
|
|
22831
22814
|
Prism.languages.cfc = Prism.languages['cfscript'];
|
|
22832
22815
|
}
|
|
22833
22816
|
|
|
22834
|
-
var refractorCpp =
|
|
22817
|
+
var refractorCpp = cpp_1;
|
|
22835
22818
|
var chaiscript_1 = chaiscript;
|
|
22836
22819
|
chaiscript.displayName = 'chaiscript';
|
|
22837
22820
|
chaiscript.aliases = [];
|
|
@@ -23004,1194 +22987,1088 @@ function cmake(Prism) {
|
|
|
23004
22987
|
};
|
|
23005
22988
|
}
|
|
23006
22989
|
|
|
23007
|
-
var cobol_1;
|
|
23008
|
-
|
|
23009
|
-
|
|
23010
|
-
function
|
|
23011
|
-
|
|
23012
|
-
|
|
23013
|
-
|
|
23014
|
-
|
|
23015
|
-
|
|
23016
|
-
|
|
23017
|
-
|
|
23018
|
-
|
|
23019
|
-
|
|
23020
|
-
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
|
|
23030
|
-
|
|
23031
|
-
|
|
23032
|
-
|
|
23033
|
-
|
|
23034
|
-
|
|
23035
|
-
|
|
23036
|
-
|
|
23037
|
-
|
|
23038
|
-
|
|
23039
|
-
|
|
23040
|
-
|
|
23041
|
-
|
|
23042
|
-
|
|
23043
|
-
|
|
23044
|
-
|
|
23045
|
-
|
|
23046
|
-
|
|
23047
|
-
|
|
23048
|
-
|
|
23049
|
-
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
|
|
23053
|
-
|
|
23054
|
-
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
|
|
23058
|
-
|
|
23059
|
-
|
|
23060
|
-
|
|
23061
|
-
|
|
23062
|
-
|
|
23063
|
-
{
|
|
23064
|
-
pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
|
|
23065
|
-
lookbehind: true
|
|
23066
|
-
}
|
|
23067
|
-
],
|
|
23068
|
-
punctuation: /[.:,()]/
|
|
23069
|
-
};
|
|
23070
|
-
}
|
|
23071
|
-
return cobol_1;
|
|
22990
|
+
var cobol_1 = cobol;
|
|
22991
|
+
cobol.displayName = 'cobol';
|
|
22992
|
+
cobol.aliases = [];
|
|
22993
|
+
function cobol(Prism) {
|
|
22994
|
+
Prism.languages.cobol = {
|
|
22995
|
+
comment: {
|
|
22996
|
+
pattern: /\*>.*|(^[ \t]*)\*.*/m,
|
|
22997
|
+
lookbehind: true,
|
|
22998
|
+
greedy: true
|
|
22999
|
+
},
|
|
23000
|
+
string: {
|
|
23001
|
+
pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
|
|
23002
|
+
greedy: true
|
|
23003
|
+
},
|
|
23004
|
+
level: {
|
|
23005
|
+
pattern: /(^[ \t]*)\d+\b/m,
|
|
23006
|
+
lookbehind: true,
|
|
23007
|
+
greedy: true,
|
|
23008
|
+
alias: 'number'
|
|
23009
|
+
},
|
|
23010
|
+
'class-name': {
|
|
23011
|
+
// https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
|
|
23012
|
+
pattern:
|
|
23013
|
+
/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
|
|
23014
|
+
lookbehind: true,
|
|
23015
|
+
inside: {
|
|
23016
|
+
number: {
|
|
23017
|
+
pattern: /(\()\d+/,
|
|
23018
|
+
lookbehind: true
|
|
23019
|
+
},
|
|
23020
|
+
punctuation: /[()]/
|
|
23021
|
+
}
|
|
23022
|
+
},
|
|
23023
|
+
keyword: {
|
|
23024
|
+
pattern:
|
|
23025
|
+
/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,
|
|
23026
|
+
lookbehind: true
|
|
23027
|
+
},
|
|
23028
|
+
boolean: {
|
|
23029
|
+
pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
|
|
23030
|
+
lookbehind: true
|
|
23031
|
+
},
|
|
23032
|
+
number: {
|
|
23033
|
+
pattern:
|
|
23034
|
+
/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
|
|
23035
|
+
lookbehind: true
|
|
23036
|
+
},
|
|
23037
|
+
operator: [
|
|
23038
|
+
/<>|[<>]=?|[=+*/&]/,
|
|
23039
|
+
{
|
|
23040
|
+
pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
|
|
23041
|
+
lookbehind: true
|
|
23042
|
+
}
|
|
23043
|
+
],
|
|
23044
|
+
punctuation: /[.:,()]/
|
|
23045
|
+
};
|
|
23072
23046
|
}
|
|
23073
23047
|
|
|
23074
|
-
var coffeescript_1;
|
|
23075
|
-
|
|
23076
|
-
|
|
23077
|
-
function
|
|
23078
|
-
if (hasRequiredCoffeescript) return coffeescript_1;
|
|
23079
|
-
hasRequiredCoffeescript = 1;
|
|
23080
|
-
|
|
23081
|
-
coffeescript_1 = coffeescript;
|
|
23082
|
-
coffeescript.displayName = 'coffeescript';
|
|
23083
|
-
coffeescript.aliases = ['coffee'];
|
|
23084
|
-
function coffeescript(Prism) {
|
|
23048
|
+
var coffeescript_1 = coffeescript;
|
|
23049
|
+
coffeescript.displayName = 'coffeescript';
|
|
23050
|
+
coffeescript.aliases = ['coffee'];
|
|
23051
|
+
function coffeescript(Prism) {
|
|
23085
23052
|
(function (Prism) {
|
|
23086
|
-
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
|
|
23090
|
-
|
|
23091
|
-
|
|
23092
|
-
|
|
23093
|
-
|
|
23094
|
-
|
|
23095
|
-
|
|
23096
|
-
|
|
23097
|
-
|
|
23098
|
-
|
|
23099
|
-
|
|
23100
|
-
|
|
23101
|
-
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23111
|
-
|
|
23112
|
-
|
|
23113
|
-
|
|
23114
|
-
|
|
23115
|
-
|
|
23116
|
-
|
|
23117
|
-
|
|
23118
|
-
|
|
23119
|
-
|
|
23120
|
-
|
|
23121
|
-
|
|
23122
|
-
|
|
23123
|
-
|
|
23124
|
-
|
|
23125
|
-
|
|
23126
|
-
|
|
23127
|
-
|
|
23128
|
-
|
|
23129
|
-
|
|
23130
|
-
|
|
23131
|
-
|
|
23132
|
-
|
|
23133
|
-
|
|
23134
|
-
|
|
23135
|
-
|
|
23136
|
-
|
|
23137
|
-
|
|
23138
|
-
|
|
23139
|
-
|
|
23140
|
-
|
|
23141
|
-
|
|
23142
|
-
|
|
23143
|
-
|
|
23144
|
-
|
|
23145
|
-
|
|
23146
|
-
|
|
23147
|
-
|
|
23148
|
-
|
|
23149
|
-
|
|
23150
|
-
|
|
23151
|
-
|
|
23152
|
-
|
|
23153
|
-
|
|
23154
|
-
|
|
23155
|
-
|
|
23156
|
-
|
|
23157
|
-
|
|
23158
|
-
|
|
23159
|
-
|
|
23160
|
-
|
|
23161
|
-
|
|
23162
|
-
|
|
23163
|
-
|
|
23164
|
-
|
|
23165
|
-
|
|
23166
|
-
|
|
23167
|
-
|
|
23168
|
-
|
|
23169
|
-
|
|
23170
|
-
}
|
|
23171
|
-
return coffeescript_1;
|
|
23053
|
+
// Ignore comments starting with { to privilege string interpolation highlighting
|
|
23054
|
+
var comment = /#(?!\{).+/;
|
|
23055
|
+
var interpolation = {
|
|
23056
|
+
pattern: /#\{[^}]+\}/,
|
|
23057
|
+
alias: 'variable'
|
|
23058
|
+
};
|
|
23059
|
+
Prism.languages.coffeescript = Prism.languages.extend('javascript', {
|
|
23060
|
+
comment: comment,
|
|
23061
|
+
string: [
|
|
23062
|
+
// Strings are multiline
|
|
23063
|
+
{
|
|
23064
|
+
pattern: /'(?:\\[\s\S]|[^\\'])*'/,
|
|
23065
|
+
greedy: true
|
|
23066
|
+
},
|
|
23067
|
+
{
|
|
23068
|
+
// Strings are multiline
|
|
23069
|
+
pattern: /"(?:\\[\s\S]|[^\\"])*"/,
|
|
23070
|
+
greedy: true,
|
|
23071
|
+
inside: {
|
|
23072
|
+
interpolation: interpolation
|
|
23073
|
+
}
|
|
23074
|
+
}
|
|
23075
|
+
],
|
|
23076
|
+
keyword:
|
|
23077
|
+
/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,
|
|
23078
|
+
'class-member': {
|
|
23079
|
+
pattern: /@(?!\d)\w+/,
|
|
23080
|
+
alias: 'variable'
|
|
23081
|
+
}
|
|
23082
|
+
});
|
|
23083
|
+
Prism.languages.insertBefore('coffeescript', 'comment', {
|
|
23084
|
+
'multiline-comment': {
|
|
23085
|
+
pattern: /###[\s\S]+?###/,
|
|
23086
|
+
alias: 'comment'
|
|
23087
|
+
},
|
|
23088
|
+
// Block regexp can contain comments and interpolation
|
|
23089
|
+
'block-regex': {
|
|
23090
|
+
pattern: /\/{3}[\s\S]*?\/{3}/,
|
|
23091
|
+
alias: 'regex',
|
|
23092
|
+
inside: {
|
|
23093
|
+
comment: comment,
|
|
23094
|
+
interpolation: interpolation
|
|
23095
|
+
}
|
|
23096
|
+
}
|
|
23097
|
+
});
|
|
23098
|
+
Prism.languages.insertBefore('coffeescript', 'string', {
|
|
23099
|
+
'inline-javascript': {
|
|
23100
|
+
pattern: /`(?:\\[\s\S]|[^\\`])*`/,
|
|
23101
|
+
inside: {
|
|
23102
|
+
delimiter: {
|
|
23103
|
+
pattern: /^`|`$/,
|
|
23104
|
+
alias: 'punctuation'
|
|
23105
|
+
},
|
|
23106
|
+
script: {
|
|
23107
|
+
pattern: /[\s\S]+/,
|
|
23108
|
+
alias: 'language-javascript',
|
|
23109
|
+
inside: Prism.languages.javascript
|
|
23110
|
+
}
|
|
23111
|
+
}
|
|
23112
|
+
},
|
|
23113
|
+
// Block strings
|
|
23114
|
+
'multiline-string': [
|
|
23115
|
+
{
|
|
23116
|
+
pattern: /'''[\s\S]*?'''/,
|
|
23117
|
+
greedy: true,
|
|
23118
|
+
alias: 'string'
|
|
23119
|
+
},
|
|
23120
|
+
{
|
|
23121
|
+
pattern: /"""[\s\S]*?"""/,
|
|
23122
|
+
greedy: true,
|
|
23123
|
+
alias: 'string',
|
|
23124
|
+
inside: {
|
|
23125
|
+
interpolation: interpolation
|
|
23126
|
+
}
|
|
23127
|
+
}
|
|
23128
|
+
]
|
|
23129
|
+
});
|
|
23130
|
+
Prism.languages.insertBefore('coffeescript', 'keyword', {
|
|
23131
|
+
// Object property
|
|
23132
|
+
property: /(?!\d)\w+(?=\s*:(?!:))/
|
|
23133
|
+
});
|
|
23134
|
+
delete Prism.languages.coffeescript['template-string'];
|
|
23135
|
+
Prism.languages.coffee = Prism.languages.coffeescript;
|
|
23136
|
+
})(Prism);
|
|
23172
23137
|
}
|
|
23173
23138
|
|
|
23174
|
-
var concurnas_1;
|
|
23175
|
-
|
|
23176
|
-
|
|
23177
|
-
function
|
|
23178
|
-
|
|
23179
|
-
|
|
23180
|
-
|
|
23181
|
-
|
|
23182
|
-
|
|
23183
|
-
|
|
23184
|
-
|
|
23185
|
-
|
|
23186
|
-
|
|
23187
|
-
|
|
23188
|
-
|
|
23189
|
-
|
|
23190
|
-
|
|
23191
|
-
|
|
23192
|
-
|
|
23193
|
-
|
|
23194
|
-
|
|
23195
|
-
|
|
23196
|
-
|
|
23197
|
-
|
|
23198
|
-
|
|
23199
|
-
|
|
23200
|
-
|
|
23201
|
-
|
|
23202
|
-
|
|
23203
|
-
|
|
23204
|
-
|
|
23205
|
-
|
|
23206
|
-
|
|
23207
|
-
|
|
23208
|
-
|
|
23209
|
-
|
|
23210
|
-
|
|
23211
|
-
|
|
23212
|
-
|
|
23213
|
-
|
|
23214
|
-
|
|
23215
|
-
|
|
23216
|
-
|
|
23217
|
-
|
|
23218
|
-
|
|
23219
|
-
|
|
23220
|
-
|
|
23221
|
-
|
|
23222
|
-
|
|
23223
|
-
|
|
23224
|
-
|
|
23225
|
-
|
|
23226
|
-
|
|
23227
|
-
|
|
23228
|
-
|
|
23229
|
-
|
|
23230
|
-
|
|
23231
|
-
|
|
23232
|
-
|
|
23233
|
-
|
|
23234
|
-
|
|
23235
|
-
|
|
23236
|
-
|
|
23237
|
-
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23241
|
-
|
|
23242
|
-
inside: Prism.languages.concurnas
|
|
23243
|
-
},
|
|
23244
|
-
string: /[\s\S]+/
|
|
23245
|
-
}
|
|
23246
|
-
}
|
|
23247
|
-
});
|
|
23248
|
-
Prism.languages.conc = Prism.languages.concurnas;
|
|
23249
|
-
}
|
|
23250
|
-
return concurnas_1;
|
|
23139
|
+
var concurnas_1 = concurnas;
|
|
23140
|
+
concurnas.displayName = 'concurnas';
|
|
23141
|
+
concurnas.aliases = ['conc'];
|
|
23142
|
+
function concurnas(Prism) {
|
|
23143
|
+
Prism.languages.concurnas = {
|
|
23144
|
+
comment: {
|
|
23145
|
+
pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
|
|
23146
|
+
lookbehind: true,
|
|
23147
|
+
greedy: true
|
|
23148
|
+
},
|
|
23149
|
+
langext: {
|
|
23150
|
+
pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
|
|
23151
|
+
greedy: true,
|
|
23152
|
+
inside: {
|
|
23153
|
+
'class-name': /^\w+/,
|
|
23154
|
+
string: {
|
|
23155
|
+
pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
|
|
23156
|
+
lookbehind: true
|
|
23157
|
+
},
|
|
23158
|
+
punctuation: /\|\|/
|
|
23159
|
+
}
|
|
23160
|
+
},
|
|
23161
|
+
function: {
|
|
23162
|
+
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
|
|
23163
|
+
lookbehind: true
|
|
23164
|
+
},
|
|
23165
|
+
keyword:
|
|
23166
|
+
/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
|
|
23167
|
+
boolean: /\b(?:false|true)\b/,
|
|
23168
|
+
number:
|
|
23169
|
+
/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
|
|
23170
|
+
punctuation: /[{}[\];(),.:]/,
|
|
23171
|
+
operator:
|
|
23172
|
+
/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
|
|
23173
|
+
annotation: {
|
|
23174
|
+
pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
|
|
23175
|
+
alias: 'builtin'
|
|
23176
|
+
}
|
|
23177
|
+
};
|
|
23178
|
+
Prism.languages.insertBefore('concurnas', 'langext', {
|
|
23179
|
+
'regex-literal': {
|
|
23180
|
+
pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
23181
|
+
greedy: true,
|
|
23182
|
+
inside: {
|
|
23183
|
+
interpolation: {
|
|
23184
|
+
pattern:
|
|
23185
|
+
/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
23186
|
+
lookbehind: true,
|
|
23187
|
+
inside: Prism.languages.concurnas
|
|
23188
|
+
},
|
|
23189
|
+
regex: /[\s\S]+/
|
|
23190
|
+
}
|
|
23191
|
+
},
|
|
23192
|
+
'string-literal': {
|
|
23193
|
+
pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
23194
|
+
greedy: true,
|
|
23195
|
+
inside: {
|
|
23196
|
+
interpolation: {
|
|
23197
|
+
pattern:
|
|
23198
|
+
/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
23199
|
+
lookbehind: true,
|
|
23200
|
+
inside: Prism.languages.concurnas
|
|
23201
|
+
},
|
|
23202
|
+
string: /[\s\S]+/
|
|
23203
|
+
}
|
|
23204
|
+
}
|
|
23205
|
+
});
|
|
23206
|
+
Prism.languages.conc = Prism.languages.concurnas;
|
|
23251
23207
|
}
|
|
23252
23208
|
|
|
23253
|
-
var coq_1;
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
function
|
|
23257
|
-
|
|
23258
|
-
|
|
23209
|
+
var coq_1 = coq;
|
|
23210
|
+
coq.displayName = 'coq';
|
|
23211
|
+
coq.aliases = [];
|
|
23212
|
+
function coq(Prism) {
|
|
23213
|
+
(function (Prism) {
|
|
23214
|
+
// https://github.com/coq/coq
|
|
23215
|
+
var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
|
|
23216
|
+
for (var i = 0; i < 2; i++) {
|
|
23217
|
+
commentSource = commentSource.replace(/<self>/g, function () {
|
|
23218
|
+
return commentSource
|
|
23219
|
+
});
|
|
23220
|
+
}
|
|
23221
|
+
commentSource = commentSource.replace(/<self>/g, '[]');
|
|
23222
|
+
Prism.languages.coq = {
|
|
23223
|
+
comment: RegExp(commentSource),
|
|
23224
|
+
string: {
|
|
23225
|
+
pattern: /"(?:[^"]|"")*"(?!")/,
|
|
23226
|
+
greedy: true
|
|
23227
|
+
},
|
|
23228
|
+
attribute: [
|
|
23229
|
+
{
|
|
23230
|
+
pattern: RegExp(
|
|
23231
|
+
/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
|
|
23232
|
+
/<comment>/g,
|
|
23233
|
+
function () {
|
|
23234
|
+
return commentSource
|
|
23235
|
+
}
|
|
23236
|
+
)
|
|
23237
|
+
),
|
|
23238
|
+
greedy: true,
|
|
23239
|
+
alias: 'attr-name',
|
|
23240
|
+
inside: {
|
|
23241
|
+
comment: RegExp(commentSource),
|
|
23242
|
+
string: {
|
|
23243
|
+
pattern: /"(?:[^"]|"")*"(?!")/,
|
|
23244
|
+
greedy: true
|
|
23245
|
+
},
|
|
23246
|
+
operator: /=/,
|
|
23247
|
+
punctuation: /^#\[|\]$|[,()]/
|
|
23248
|
+
}
|
|
23249
|
+
},
|
|
23250
|
+
{
|
|
23251
|
+
pattern:
|
|
23252
|
+
/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
|
|
23253
|
+
alias: 'attr-name'
|
|
23254
|
+
}
|
|
23255
|
+
],
|
|
23256
|
+
keyword:
|
|
23257
|
+
/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,
|
|
23258
|
+
number:
|
|
23259
|
+
/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
|
|
23260
|
+
punct: {
|
|
23261
|
+
pattern: /@\{|\{\||\[=|:>/,
|
|
23262
|
+
alias: 'punctuation'
|
|
23263
|
+
},
|
|
23264
|
+
operator:
|
|
23265
|
+
/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
|
|
23266
|
+
punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
|
|
23267
|
+
};
|
|
23268
|
+
})(Prism);
|
|
23269
|
+
}
|
|
23259
23270
|
|
|
23260
|
-
|
|
23261
|
-
|
|
23262
|
-
|
|
23263
|
-
|
|
23271
|
+
var ruby_1 = ruby;
|
|
23272
|
+
ruby.displayName = 'ruby';
|
|
23273
|
+
ruby.aliases = ['rb'];
|
|
23274
|
+
function ruby(Prism) {
|
|
23264
23275
|
(function (Prism) {
|
|
23265
|
-
|
|
23266
|
-
|
|
23267
|
-
|
|
23268
|
-
|
|
23269
|
-
|
|
23270
|
-
|
|
23271
|
-
|
|
23272
|
-
|
|
23273
|
-
|
|
23274
|
-
|
|
23275
|
-
|
|
23276
|
-
|
|
23277
|
-
|
|
23278
|
-
|
|
23279
|
-
|
|
23280
|
-
|
|
23281
|
-
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23290
|
-
|
|
23291
|
-
|
|
23292
|
-
|
|
23293
|
-
|
|
23294
|
-
|
|
23295
|
-
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
|
|
23299
|
-
|
|
23300
|
-
|
|
23301
|
-
|
|
23302
|
-
|
|
23303
|
-
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
|
|
23310
|
-
|
|
23311
|
-
|
|
23312
|
-
|
|
23313
|
-
|
|
23314
|
-
|
|
23315
|
-
|
|
23316
|
-
|
|
23317
|
-
|
|
23318
|
-
|
|
23319
|
-
|
|
23320
|
-
|
|
23321
|
-
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
|
|
23329
|
-
|
|
23330
|
-
|
|
23331
|
-
|
|
23332
|
-
|
|
23333
|
-
|
|
23334
|
-
|
|
23335
|
-
|
|
23336
|
-
|
|
23337
|
-
|
|
23338
|
-
|
|
23339
|
-
|
|
23340
|
-
|
|
23341
|
-
|
|
23342
|
-
|
|
23343
|
-
|
|
23344
|
-
|
|
23345
|
-
|
|
23346
|
-
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23351
|
-
|
|
23352
|
-
|
|
23353
|
-
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
|
|
23357
|
-
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
|
|
23362
|
-
|
|
23363
|
-
|
|
23364
|
-
|
|
23365
|
-
|
|
23366
|
-
|
|
23367
|
-
|
|
23368
|
-
|
|
23369
|
-
|
|
23370
|
-
|
|
23371
|
-
|
|
23372
|
-
|
|
23373
|
-
|
|
23374
|
-
|
|
23375
|
-
|
|
23376
|
-
|
|
23377
|
-
|
|
23378
|
-
|
|
23379
|
-
|
|
23380
|
-
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23388
|
-
|
|
23389
|
-
|
|
23390
|
-
|
|
23391
|
-
|
|
23392
|
-
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23401
|
-
|
|
23402
|
-
|
|
23403
|
-
|
|
23404
|
-
|
|
23405
|
-
|
|
23406
|
-
|
|
23407
|
-
|
|
23408
|
-
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
|
|
23418
|
-
|
|
23419
|
-
|
|
23420
|
-
|
|
23421
|
-
|
|
23422
|
-
|
|
23423
|
-
|
|
23424
|
-
|
|
23425
|
-
|
|
23426
|
-
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
|
|
23430
|
-
|
|
23431
|
-
|
|
23432
|
-
|
|
23433
|
-
|
|
23434
|
-
|
|
23435
|
-
|
|
23436
|
-
|
|
23437
|
-
|
|
23438
|
-
|
|
23439
|
-
|
|
23440
|
-
|
|
23441
|
-
|
|
23442
|
-
|
|
23443
|
-
|
|
23444
|
-
|
|
23445
|
-
|
|
23446
|
-
|
|
23447
|
-
|
|
23448
|
-
|
|
23449
|
-
|
|
23450
|
-
|
|
23451
|
-
|
|
23452
|
-
greedy: true,
|
|
23453
|
-
inside: {
|
|
23454
|
-
interpolation: interpolation,
|
|
23455
|
-
string: /[\s\S]+/
|
|
23456
|
-
}
|
|
23457
|
-
},
|
|
23458
|
-
{
|
|
23459
|
-
pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
23460
|
-
alias: 'heredoc-string',
|
|
23461
|
-
greedy: true,
|
|
23462
|
-
inside: {
|
|
23463
|
-
delimiter: {
|
|
23464
|
-
pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
|
|
23465
|
-
inside: {
|
|
23466
|
-
symbol: /\b\w+/,
|
|
23467
|
-
punctuation: /^<<[-~]?/
|
|
23468
|
-
}
|
|
23469
|
-
},
|
|
23470
|
-
interpolation: interpolation,
|
|
23471
|
-
string: /[\s\S]+/
|
|
23472
|
-
}
|
|
23473
|
-
},
|
|
23474
|
-
{
|
|
23475
|
-
pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
23476
|
-
alias: 'heredoc-string',
|
|
23477
|
-
greedy: true,
|
|
23478
|
-
inside: {
|
|
23479
|
-
delimiter: {
|
|
23480
|
-
pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
|
|
23481
|
-
inside: {
|
|
23482
|
-
symbol: /\b\w+/,
|
|
23483
|
-
punctuation: /^<<[-~]?'|'$/
|
|
23484
|
-
}
|
|
23485
|
-
},
|
|
23486
|
-
string: /[\s\S]+/
|
|
23487
|
-
}
|
|
23488
|
-
}
|
|
23489
|
-
],
|
|
23490
|
-
'command-literal': [
|
|
23491
|
-
{
|
|
23492
|
-
pattern: RegExp(/%x/.source + percentExpression),
|
|
23493
|
-
greedy: true,
|
|
23494
|
-
inside: {
|
|
23495
|
-
interpolation: interpolation,
|
|
23496
|
-
command: {
|
|
23497
|
-
pattern: /[\s\S]+/,
|
|
23498
|
-
alias: 'string'
|
|
23499
|
-
}
|
|
23500
|
-
}
|
|
23501
|
-
},
|
|
23502
|
-
{
|
|
23503
|
-
pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
|
|
23504
|
-
greedy: true,
|
|
23505
|
-
inside: {
|
|
23506
|
-
interpolation: interpolation,
|
|
23507
|
-
command: {
|
|
23508
|
-
pattern: /[\s\S]+/,
|
|
23509
|
-
alias: 'string'
|
|
23510
|
-
}
|
|
23511
|
-
}
|
|
23512
|
-
}
|
|
23513
|
-
]
|
|
23514
|
-
});
|
|
23515
|
-
delete Prism.languages.ruby.string;
|
|
23516
|
-
Prism.languages.insertBefore('ruby', 'number', {
|
|
23517
|
-
builtin:
|
|
23518
|
-
/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
|
|
23519
|
-
constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
|
|
23520
|
-
});
|
|
23521
|
-
Prism.languages.rb = Prism.languages.ruby;
|
|
23522
|
-
})(Prism);
|
|
23523
|
-
}
|
|
23524
|
-
return ruby_1;
|
|
23525
|
-
}
|
|
23526
|
-
|
|
23527
|
-
var crystal_1;
|
|
23528
|
-
var hasRequiredCrystal;
|
|
23529
|
-
|
|
23530
|
-
function requireCrystal () {
|
|
23531
|
-
if (hasRequiredCrystal) return crystal_1;
|
|
23532
|
-
hasRequiredCrystal = 1;
|
|
23533
|
-
var refractorRuby = requireRuby();
|
|
23534
|
-
crystal_1 = crystal;
|
|
23535
|
-
crystal.displayName = 'crystal';
|
|
23536
|
-
crystal.aliases = [];
|
|
23537
|
-
function crystal(Prism) {
|
|
23538
|
-
Prism.register(refractorRuby)
|
|
23539
|
-
;(function (Prism) {
|
|
23540
|
-
Prism.languages.crystal = Prism.languages.extend('ruby', {
|
|
23541
|
-
keyword: [
|
|
23542
|
-
/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,
|
|
23543
|
-
{
|
|
23544
|
-
pattern: /(\.\s*)(?:is_a|responds_to)\?/,
|
|
23545
|
-
lookbehind: true
|
|
23546
|
-
}
|
|
23547
|
-
],
|
|
23548
|
-
number:
|
|
23549
|
-
/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
|
|
23550
|
-
operator: [/->/, Prism.languages.ruby.operator],
|
|
23551
|
-
punctuation: /[(){}[\].,;\\]/
|
|
23552
|
-
});
|
|
23553
|
-
Prism.languages.insertBefore('crystal', 'string-literal', {
|
|
23554
|
-
attribute: {
|
|
23555
|
-
pattern: /@\[.*?\]/,
|
|
23556
|
-
inside: {
|
|
23557
|
-
delimiter: {
|
|
23558
|
-
pattern: /^@\[|\]$/,
|
|
23559
|
-
alias: 'punctuation'
|
|
23560
|
-
},
|
|
23561
|
-
attribute: {
|
|
23562
|
-
pattern: /^(\s*)\w+/,
|
|
23563
|
-
lookbehind: true,
|
|
23564
|
-
alias: 'class-name'
|
|
23565
|
-
},
|
|
23566
|
-
args: {
|
|
23567
|
-
pattern: /\S(?:[\s\S]*\S)?/,
|
|
23568
|
-
inside: Prism.languages.crystal
|
|
23569
|
-
}
|
|
23570
|
-
}
|
|
23571
|
-
},
|
|
23572
|
-
expansion: {
|
|
23573
|
-
pattern: /\{(?:\{.*?\}|%.*?%)\}/,
|
|
23574
|
-
inside: {
|
|
23575
|
-
content: {
|
|
23576
|
-
pattern: /^(\{.)[\s\S]+(?=.\}$)/,
|
|
23577
|
-
lookbehind: true,
|
|
23578
|
-
inside: Prism.languages.crystal
|
|
23579
|
-
},
|
|
23580
|
-
delimiter: {
|
|
23581
|
-
pattern: /^\{[\{%]|[\}%]\}$/,
|
|
23582
|
-
alias: 'operator'
|
|
23583
|
-
}
|
|
23584
|
-
}
|
|
23585
|
-
},
|
|
23586
|
-
char: {
|
|
23587
|
-
pattern:
|
|
23588
|
-
/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
|
|
23589
|
-
greedy: true
|
|
23590
|
-
}
|
|
23591
|
-
});
|
|
23592
|
-
})(Prism);
|
|
23593
|
-
}
|
|
23594
|
-
return crystal_1;
|
|
23595
|
-
}
|
|
23596
|
-
|
|
23597
|
-
var cshtml_1;
|
|
23598
|
-
var hasRequiredCshtml;
|
|
23599
|
-
|
|
23600
|
-
function requireCshtml () {
|
|
23601
|
-
if (hasRequiredCshtml) return cshtml_1;
|
|
23602
|
-
hasRequiredCshtml = 1;
|
|
23603
|
-
var refractorCsharp = requireCsharp();
|
|
23604
|
-
cshtml_1 = cshtml;
|
|
23605
|
-
cshtml.displayName = 'cshtml';
|
|
23606
|
-
cshtml.aliases = ['razor'];
|
|
23607
|
-
function cshtml(Prism) {
|
|
23608
|
-
Prism.register(refractorCsharp)
|
|
23609
|
-
// Docs:
|
|
23610
|
-
// https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio
|
|
23611
|
-
// https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-5.0
|
|
23612
|
-
;(function (Prism) {
|
|
23613
|
-
var commentLike = /\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//
|
|
23614
|
-
.source;
|
|
23615
|
-
var stringLike =
|
|
23616
|
-
/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source +
|
|
23617
|
-
'|' +
|
|
23618
|
-
/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;
|
|
23619
|
-
/**
|
|
23620
|
-
* Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
|
|
23621
|
-
*
|
|
23622
|
-
* @param {string} pattern
|
|
23623
|
-
* @param {number} depthLog2
|
|
23624
|
-
* @returns {string}
|
|
23625
|
-
*/
|
|
23626
|
-
function nested(pattern, depthLog2) {
|
|
23627
|
-
for (var i = 0; i < depthLog2; i++) {
|
|
23628
|
-
pattern = pattern.replace(/<self>/g, function () {
|
|
23629
|
-
return '(?:' + pattern + ')'
|
|
23630
|
-
});
|
|
23631
|
-
}
|
|
23632
|
-
return pattern
|
|
23633
|
-
.replace(/<self>/g, '[^\\s\\S]')
|
|
23634
|
-
.replace(/<str>/g, '(?:' + stringLike + ')')
|
|
23635
|
-
.replace(/<comment>/g, '(?:' + commentLike + ')')
|
|
23636
|
-
}
|
|
23637
|
-
var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2);
|
|
23638
|
-
var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 2);
|
|
23639
|
-
var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2);
|
|
23640
|
-
var angle = nested(/<(?:[^<>'"@/]|<str>|<comment>|<self>)*>/.source, 2); // Note about the above bracket patterns:
|
|
23641
|
-
// They all ignore HTML expressions that might be in the C# code. This is a problem because HTML (like strings and
|
|
23642
|
-
// comments) is parsed differently. This is a huge problem because HTML might contain brackets and quotes which
|
|
23643
|
-
// messes up the bracket and string counting implemented by the above patterns.
|
|
23644
|
-
//
|
|
23645
|
-
// This problem is not fixable because 1) HTML expression are highly context sensitive and very difficult to detect
|
|
23646
|
-
// and 2) they require one capturing group at every nested level. See the `tagRegion` pattern to admire the
|
|
23647
|
-
// complexity of an HTML expression.
|
|
23648
|
-
//
|
|
23649
|
-
// To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
|
|
23650
|
-
// allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
|
|
23651
|
-
var tagAttrs =
|
|
23652
|
-
/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/
|
|
23653
|
-
.source;
|
|
23654
|
-
var tagContent = /(?!\d)[^\s>\/=$<%]+/.source + tagAttrs + /\s*\/?>/.source;
|
|
23655
|
-
var tagRegion =
|
|
23656
|
-
/\B@?/.source +
|
|
23657
|
-
'(?:' +
|
|
23658
|
-
/<([a-zA-Z][\w:]*)/.source +
|
|
23659
|
-
tagAttrs +
|
|
23660
|
-
/\s*>/.source +
|
|
23661
|
-
'(?:' +
|
|
23662
|
-
(/[^<]/.source +
|
|
23663
|
-
'|' + // all tags that are not the start tag
|
|
23664
|
-
// eslint-disable-next-line regexp/strict
|
|
23665
|
-
/<\/?(?!\1\b)/.source +
|
|
23666
|
-
tagContent +
|
|
23667
|
-
'|' + // nested start tag
|
|
23668
|
-
nested(
|
|
23669
|
-
// eslint-disable-next-line regexp/strict
|
|
23670
|
-
/<\1/.source +
|
|
23671
|
-
tagAttrs +
|
|
23672
|
-
/\s*>/.source +
|
|
23673
|
-
'(?:' +
|
|
23674
|
-
(/[^<]/.source +
|
|
23675
|
-
'|' + // all tags that are not the start tag
|
|
23676
|
-
// eslint-disable-next-line regexp/strict
|
|
23677
|
-
/<\/?(?!\1\b)/.source +
|
|
23678
|
-
tagContent +
|
|
23679
|
-
'|' +
|
|
23680
|
-
'<self>') +
|
|
23681
|
-
')*' + // eslint-disable-next-line regexp/strict
|
|
23682
|
-
/<\/\1\s*>/.source,
|
|
23683
|
-
2
|
|
23684
|
-
)) +
|
|
23685
|
-
')*' + // eslint-disable-next-line regexp/strict
|
|
23686
|
-
/<\/\1\s*>/.source +
|
|
23687
|
-
'|' +
|
|
23688
|
-
/</.source +
|
|
23689
|
-
tagContent +
|
|
23690
|
-
')'; // Now for the actual language definition(s):
|
|
23691
|
-
//
|
|
23692
|
-
// Razor as a language has 2 parts:
|
|
23693
|
-
// 1) CSHTML: A markup-like language that has been extended with inline C# code expressions and blocks.
|
|
23694
|
-
// 2) C#+HTML: A variant of C# that can contain CSHTML tags as expressions.
|
|
23695
|
-
//
|
|
23696
|
-
// In the below code, both CSHTML and C#+HTML will be create as separate language definitions that reference each
|
|
23697
|
-
// other. However, only CSHTML will be exported via `Prism.languages`.
|
|
23698
|
-
Prism.languages.cshtml = Prism.languages.extend('markup', {});
|
|
23699
|
-
var csharpWithHtml = Prism.languages.insertBefore(
|
|
23700
|
-
'csharp',
|
|
23701
|
-
'string',
|
|
23702
|
-
{
|
|
23703
|
-
html: {
|
|
23704
|
-
pattern: RegExp(tagRegion),
|
|
23705
|
-
greedy: true,
|
|
23706
|
-
inside: Prism.languages.cshtml
|
|
23707
|
-
}
|
|
23708
|
-
},
|
|
23709
|
-
{
|
|
23710
|
-
csharp: Prism.languages.extend('csharp', {})
|
|
23711
|
-
}
|
|
23712
|
-
);
|
|
23713
|
-
var cs = {
|
|
23714
|
-
pattern: /\S[\s\S]*/,
|
|
23715
|
-
alias: 'language-csharp',
|
|
23716
|
-
inside: csharpWithHtml
|
|
23717
|
-
};
|
|
23718
|
-
Prism.languages.insertBefore('cshtml', 'prolog', {
|
|
23719
|
-
'razor-comment': {
|
|
23720
|
-
pattern: /@\*[\s\S]*?\*@/,
|
|
23721
|
-
greedy: true,
|
|
23722
|
-
alias: 'comment'
|
|
23723
|
-
},
|
|
23724
|
-
block: {
|
|
23725
|
-
pattern: RegExp(
|
|
23726
|
-
/(^|[^@])@/.source +
|
|
23727
|
-
'(?:' +
|
|
23728
|
-
[
|
|
23729
|
-
// @{ ... }
|
|
23730
|
-
curly, // @code{ ... }
|
|
23731
|
-
/(?:code|functions)\s*/.source + curly, // @for (...) { ... }
|
|
23732
|
-
/(?:for|foreach|lock|switch|using|while)\s*/.source +
|
|
23733
|
-
round +
|
|
23734
|
-
/\s*/.source +
|
|
23735
|
-
curly, // @do { ... } while (...);
|
|
23736
|
-
/do\s*/.source +
|
|
23737
|
-
curly +
|
|
23738
|
-
/\s*while\s*/.source +
|
|
23739
|
-
round +
|
|
23740
|
-
/(?:\s*;)?/.source, // @try { ... } catch (...) { ... } finally { ... }
|
|
23741
|
-
/try\s*/.source +
|
|
23742
|
-
curly +
|
|
23743
|
-
/\s*catch\s*/.source +
|
|
23744
|
-
round +
|
|
23745
|
-
/\s*/.source +
|
|
23746
|
-
curly +
|
|
23747
|
-
/\s*finally\s*/.source +
|
|
23748
|
-
curly, // @if (...) {...} else if (...) {...} else {...}
|
|
23749
|
-
/if\s*/.source +
|
|
23750
|
-
round +
|
|
23751
|
-
/\s*/.source +
|
|
23752
|
-
curly +
|
|
23753
|
-
'(?:' +
|
|
23754
|
-
/\s*else/.source +
|
|
23755
|
-
'(?:' +
|
|
23756
|
-
/\s+if\s*/.source +
|
|
23757
|
-
round +
|
|
23758
|
-
')?' +
|
|
23759
|
-
/\s*/.source +
|
|
23760
|
-
curly +
|
|
23761
|
-
')*'
|
|
23762
|
-
].join('|') +
|
|
23763
|
-
')'
|
|
23764
|
-
),
|
|
23765
|
-
lookbehind: true,
|
|
23766
|
-
greedy: true,
|
|
23767
|
-
inside: {
|
|
23768
|
-
keyword: /^@\w*/,
|
|
23769
|
-
csharp: cs
|
|
23770
|
-
}
|
|
23771
|
-
},
|
|
23772
|
-
directive: {
|
|
23773
|
-
pattern:
|
|
23774
|
-
/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,
|
|
23775
|
-
lookbehind: true,
|
|
23776
|
-
greedy: true,
|
|
23777
|
-
inside: {
|
|
23778
|
-
keyword: /^@\w+/,
|
|
23779
|
-
csharp: cs
|
|
23780
|
-
}
|
|
23781
|
-
},
|
|
23782
|
-
value: {
|
|
23783
|
-
pattern: RegExp(
|
|
23784
|
-
/(^|[^@])@/.source +
|
|
23785
|
-
/(?:await\b\s*)?/.source +
|
|
23786
|
-
'(?:' +
|
|
23787
|
-
/\w+\b/.source +
|
|
23788
|
-
'|' +
|
|
23789
|
-
round +
|
|
23790
|
-
')' +
|
|
23791
|
-
'(?:' +
|
|
23792
|
-
/[?!]?\.\w+\b/.source +
|
|
23793
|
-
'|' +
|
|
23794
|
-
round +
|
|
23795
|
-
'|' +
|
|
23796
|
-
square +
|
|
23797
|
-
'|' +
|
|
23798
|
-
angle +
|
|
23799
|
-
round +
|
|
23800
|
-
')*'
|
|
23801
|
-
),
|
|
23802
|
-
lookbehind: true,
|
|
23803
|
-
greedy: true,
|
|
23804
|
-
alias: 'variable',
|
|
23805
|
-
inside: {
|
|
23806
|
-
keyword: /^@/,
|
|
23807
|
-
csharp: cs
|
|
23808
|
-
}
|
|
23809
|
-
},
|
|
23810
|
-
'delegate-operator': {
|
|
23811
|
-
pattern: /(^|[^@])@(?=<)/,
|
|
23812
|
-
lookbehind: true,
|
|
23813
|
-
alias: 'operator'
|
|
23814
|
-
}
|
|
23815
|
-
});
|
|
23816
|
-
Prism.languages.razor = Prism.languages.cshtml;
|
|
23817
|
-
})(Prism);
|
|
23818
|
-
}
|
|
23819
|
-
return cshtml_1;
|
|
23276
|
+
Prism.languages.ruby = Prism.languages.extend('clike', {
|
|
23277
|
+
comment: {
|
|
23278
|
+
pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
|
|
23279
|
+
greedy: true
|
|
23280
|
+
},
|
|
23281
|
+
'class-name': {
|
|
23282
|
+
pattern:
|
|
23283
|
+
/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
|
|
23284
|
+
lookbehind: true,
|
|
23285
|
+
inside: {
|
|
23286
|
+
punctuation: /[.\\]/
|
|
23287
|
+
}
|
|
23288
|
+
},
|
|
23289
|
+
keyword:
|
|
23290
|
+
/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
|
|
23291
|
+
operator:
|
|
23292
|
+
/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
|
|
23293
|
+
punctuation: /[(){}[\].,;]/
|
|
23294
|
+
});
|
|
23295
|
+
Prism.languages.insertBefore('ruby', 'operator', {
|
|
23296
|
+
'double-colon': {
|
|
23297
|
+
pattern: /::/,
|
|
23298
|
+
alias: 'punctuation'
|
|
23299
|
+
}
|
|
23300
|
+
});
|
|
23301
|
+
var interpolation = {
|
|
23302
|
+
pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
|
|
23303
|
+
lookbehind: true,
|
|
23304
|
+
inside: {
|
|
23305
|
+
content: {
|
|
23306
|
+
pattern: /^(#\{)[\s\S]+(?=\}$)/,
|
|
23307
|
+
lookbehind: true,
|
|
23308
|
+
inside: Prism.languages.ruby
|
|
23309
|
+
},
|
|
23310
|
+
delimiter: {
|
|
23311
|
+
pattern: /^#\{|\}$/,
|
|
23312
|
+
alias: 'punctuation'
|
|
23313
|
+
}
|
|
23314
|
+
}
|
|
23315
|
+
};
|
|
23316
|
+
delete Prism.languages.ruby.function;
|
|
23317
|
+
var percentExpression =
|
|
23318
|
+
'(?:' +
|
|
23319
|
+
[
|
|
23320
|
+
/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
|
|
23321
|
+
/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
|
|
23322
|
+
/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
|
|
23323
|
+
/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
|
|
23324
|
+
/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
|
|
23325
|
+
].join('|') +
|
|
23326
|
+
')';
|
|
23327
|
+
var symbolName =
|
|
23328
|
+
/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
|
|
23329
|
+
.source;
|
|
23330
|
+
Prism.languages.insertBefore('ruby', 'keyword', {
|
|
23331
|
+
'regex-literal': [
|
|
23332
|
+
{
|
|
23333
|
+
pattern: RegExp(
|
|
23334
|
+
/%r/.source + percentExpression + /[egimnosux]{0,6}/.source
|
|
23335
|
+
),
|
|
23336
|
+
greedy: true,
|
|
23337
|
+
inside: {
|
|
23338
|
+
interpolation: interpolation,
|
|
23339
|
+
regex: /[\s\S]+/
|
|
23340
|
+
}
|
|
23341
|
+
},
|
|
23342
|
+
{
|
|
23343
|
+
pattern:
|
|
23344
|
+
/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
|
|
23345
|
+
lookbehind: true,
|
|
23346
|
+
greedy: true,
|
|
23347
|
+
inside: {
|
|
23348
|
+
interpolation: interpolation,
|
|
23349
|
+
regex: /[\s\S]+/
|
|
23350
|
+
}
|
|
23351
|
+
}
|
|
23352
|
+
],
|
|
23353
|
+
variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
|
|
23354
|
+
symbol: [
|
|
23355
|
+
{
|
|
23356
|
+
pattern: RegExp(/(^|[^:]):/.source + symbolName),
|
|
23357
|
+
lookbehind: true,
|
|
23358
|
+
greedy: true
|
|
23359
|
+
},
|
|
23360
|
+
{
|
|
23361
|
+
pattern: RegExp(
|
|
23362
|
+
/([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
|
|
23363
|
+
),
|
|
23364
|
+
lookbehind: true,
|
|
23365
|
+
greedy: true
|
|
23366
|
+
}
|
|
23367
|
+
],
|
|
23368
|
+
'method-definition': {
|
|
23369
|
+
pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
|
|
23370
|
+
lookbehind: true,
|
|
23371
|
+
inside: {
|
|
23372
|
+
function: /\b\w+$/,
|
|
23373
|
+
keyword: /^self\b/,
|
|
23374
|
+
'class-name': /^\w+/,
|
|
23375
|
+
punctuation: /\./
|
|
23376
|
+
}
|
|
23377
|
+
}
|
|
23378
|
+
});
|
|
23379
|
+
Prism.languages.insertBefore('ruby', 'string', {
|
|
23380
|
+
'string-literal': [
|
|
23381
|
+
{
|
|
23382
|
+
pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
|
|
23383
|
+
greedy: true,
|
|
23384
|
+
inside: {
|
|
23385
|
+
interpolation: interpolation,
|
|
23386
|
+
string: /[\s\S]+/
|
|
23387
|
+
}
|
|
23388
|
+
},
|
|
23389
|
+
{
|
|
23390
|
+
pattern:
|
|
23391
|
+
/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
|
|
23392
|
+
greedy: true,
|
|
23393
|
+
inside: {
|
|
23394
|
+
interpolation: interpolation,
|
|
23395
|
+
string: /[\s\S]+/
|
|
23396
|
+
}
|
|
23397
|
+
},
|
|
23398
|
+
{
|
|
23399
|
+
pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
23400
|
+
alias: 'heredoc-string',
|
|
23401
|
+
greedy: true,
|
|
23402
|
+
inside: {
|
|
23403
|
+
delimiter: {
|
|
23404
|
+
pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
|
|
23405
|
+
inside: {
|
|
23406
|
+
symbol: /\b\w+/,
|
|
23407
|
+
punctuation: /^<<[-~]?/
|
|
23408
|
+
}
|
|
23409
|
+
},
|
|
23410
|
+
interpolation: interpolation,
|
|
23411
|
+
string: /[\s\S]+/
|
|
23412
|
+
}
|
|
23413
|
+
},
|
|
23414
|
+
{
|
|
23415
|
+
pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
23416
|
+
alias: 'heredoc-string',
|
|
23417
|
+
greedy: true,
|
|
23418
|
+
inside: {
|
|
23419
|
+
delimiter: {
|
|
23420
|
+
pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
|
|
23421
|
+
inside: {
|
|
23422
|
+
symbol: /\b\w+/,
|
|
23423
|
+
punctuation: /^<<[-~]?'|'$/
|
|
23424
|
+
}
|
|
23425
|
+
},
|
|
23426
|
+
string: /[\s\S]+/
|
|
23427
|
+
}
|
|
23428
|
+
}
|
|
23429
|
+
],
|
|
23430
|
+
'command-literal': [
|
|
23431
|
+
{
|
|
23432
|
+
pattern: RegExp(/%x/.source + percentExpression),
|
|
23433
|
+
greedy: true,
|
|
23434
|
+
inside: {
|
|
23435
|
+
interpolation: interpolation,
|
|
23436
|
+
command: {
|
|
23437
|
+
pattern: /[\s\S]+/,
|
|
23438
|
+
alias: 'string'
|
|
23439
|
+
}
|
|
23440
|
+
}
|
|
23441
|
+
},
|
|
23442
|
+
{
|
|
23443
|
+
pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
|
|
23444
|
+
greedy: true,
|
|
23445
|
+
inside: {
|
|
23446
|
+
interpolation: interpolation,
|
|
23447
|
+
command: {
|
|
23448
|
+
pattern: /[\s\S]+/,
|
|
23449
|
+
alias: 'string'
|
|
23450
|
+
}
|
|
23451
|
+
}
|
|
23452
|
+
}
|
|
23453
|
+
]
|
|
23454
|
+
});
|
|
23455
|
+
delete Prism.languages.ruby.string;
|
|
23456
|
+
Prism.languages.insertBefore('ruby', 'number', {
|
|
23457
|
+
builtin:
|
|
23458
|
+
/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
|
|
23459
|
+
constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
|
|
23460
|
+
});
|
|
23461
|
+
Prism.languages.rb = Prism.languages.ruby;
|
|
23462
|
+
})(Prism);
|
|
23820
23463
|
}
|
|
23821
23464
|
|
|
23822
|
-
var
|
|
23823
|
-
var
|
|
23824
|
-
|
|
23825
|
-
|
|
23826
|
-
|
|
23827
|
-
|
|
23828
|
-
|
|
23829
|
-
|
|
23830
|
-
|
|
23831
|
-
|
|
23832
|
-
|
|
23833
|
-
|
|
23834
|
-
|
|
23835
|
-
|
|
23836
|
-
|
|
23837
|
-
|
|
23838
|
-
|
|
23839
|
-
|
|
23840
|
-
|
|
23841
|
-
|
|
23842
|
-
|
|
23843
|
-
|
|
23844
|
-
|
|
23845
|
-
|
|
23846
|
-
|
|
23847
|
-
|
|
23848
|
-
|
|
23849
|
-
|
|
23850
|
-
|
|
23851
|
-
|
|
23852
|
-
|
|
23853
|
-
|
|
23854
|
-
|
|
23855
|
-
|
|
23856
|
-
|
|
23857
|
-
|
|
23858
|
-
|
|
23859
|
-
|
|
23860
|
-
|
|
23861
|
-
|
|
23862
|
-
|
|
23863
|
-
|
|
23864
|
-
|
|
23865
|
-
|
|
23866
|
-
|
|
23867
|
-
|
|
23868
|
-
|
|
23869
|
-
|
|
23870
|
-
|
|
23871
|
-
|
|
23872
|
-
|
|
23873
|
-
|
|
23874
|
-
|
|
23875
|
-
|
|
23876
|
-
|
|
23877
|
-
|
|
23878
|
-
|
|
23879
|
-
|
|
23880
|
-
|
|
23881
|
-
|
|
23882
|
-
}
|
|
23883
|
-
},
|
|
23884
|
-
keyword: [
|
|
23885
|
-
{
|
|
23886
|
-
pattern: value(/'unsafe-[a-z-]+'/.source),
|
|
23887
|
-
lookbehind: true,
|
|
23888
|
-
alias: 'unsafe'
|
|
23889
|
-
},
|
|
23890
|
-
{
|
|
23891
|
-
pattern: value(/'[a-z-]+'/.source),
|
|
23892
|
-
lookbehind: true,
|
|
23893
|
-
alias: 'safe'
|
|
23894
|
-
}
|
|
23895
|
-
],
|
|
23896
|
-
punctuation: /;/
|
|
23897
|
-
};
|
|
23898
|
-
})(Prism);
|
|
23899
|
-
}
|
|
23900
|
-
return csp_1;
|
|
23465
|
+
var refractorRuby = ruby_1;
|
|
23466
|
+
var crystal_1 = crystal;
|
|
23467
|
+
crystal.displayName = 'crystal';
|
|
23468
|
+
crystal.aliases = [];
|
|
23469
|
+
function crystal(Prism) {
|
|
23470
|
+
Prism.register(refractorRuby)
|
|
23471
|
+
;(function (Prism) {
|
|
23472
|
+
Prism.languages.crystal = Prism.languages.extend('ruby', {
|
|
23473
|
+
keyword: [
|
|
23474
|
+
/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,
|
|
23475
|
+
{
|
|
23476
|
+
pattern: /(\.\s*)(?:is_a|responds_to)\?/,
|
|
23477
|
+
lookbehind: true
|
|
23478
|
+
}
|
|
23479
|
+
],
|
|
23480
|
+
number:
|
|
23481
|
+
/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,
|
|
23482
|
+
operator: [/->/, Prism.languages.ruby.operator],
|
|
23483
|
+
punctuation: /[(){}[\].,;\\]/
|
|
23484
|
+
});
|
|
23485
|
+
Prism.languages.insertBefore('crystal', 'string-literal', {
|
|
23486
|
+
attribute: {
|
|
23487
|
+
pattern: /@\[.*?\]/,
|
|
23488
|
+
inside: {
|
|
23489
|
+
delimiter: {
|
|
23490
|
+
pattern: /^@\[|\]$/,
|
|
23491
|
+
alias: 'punctuation'
|
|
23492
|
+
},
|
|
23493
|
+
attribute: {
|
|
23494
|
+
pattern: /^(\s*)\w+/,
|
|
23495
|
+
lookbehind: true,
|
|
23496
|
+
alias: 'class-name'
|
|
23497
|
+
},
|
|
23498
|
+
args: {
|
|
23499
|
+
pattern: /\S(?:[\s\S]*\S)?/,
|
|
23500
|
+
inside: Prism.languages.crystal
|
|
23501
|
+
}
|
|
23502
|
+
}
|
|
23503
|
+
},
|
|
23504
|
+
expansion: {
|
|
23505
|
+
pattern: /\{(?:\{.*?\}|%.*?%)\}/,
|
|
23506
|
+
inside: {
|
|
23507
|
+
content: {
|
|
23508
|
+
pattern: /^(\{.)[\s\S]+(?=.\}$)/,
|
|
23509
|
+
lookbehind: true,
|
|
23510
|
+
inside: Prism.languages.crystal
|
|
23511
|
+
},
|
|
23512
|
+
delimiter: {
|
|
23513
|
+
pattern: /^\{[\{%]|[\}%]\}$/,
|
|
23514
|
+
alias: 'operator'
|
|
23515
|
+
}
|
|
23516
|
+
}
|
|
23517
|
+
},
|
|
23518
|
+
char: {
|
|
23519
|
+
pattern:
|
|
23520
|
+
/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
|
|
23521
|
+
greedy: true
|
|
23522
|
+
}
|
|
23523
|
+
});
|
|
23524
|
+
})(Prism);
|
|
23901
23525
|
}
|
|
23902
23526
|
|
|
23903
|
-
var
|
|
23904
|
-
var
|
|
23905
|
-
|
|
23906
|
-
|
|
23907
|
-
|
|
23908
|
-
|
|
23909
|
-
|
|
23910
|
-
|
|
23911
|
-
|
|
23912
|
-
|
|
23913
|
-
|
|
23914
|
-
|
|
23915
|
-
|
|
23916
|
-
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
|
|
23921
|
-
|
|
23922
|
-
|
|
23923
|
-
|
|
23924
|
-
|
|
23925
|
-
|
|
23926
|
-
|
|
23927
|
-
|
|
23928
|
-
|
|
23929
|
-
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
|
|
23933
|
-
|
|
23934
|
-
|
|
23935
|
-
|
|
23936
|
-
|
|
23937
|
-
|
|
23938
|
-
|
|
23939
|
-
|
|
23940
|
-
|
|
23941
|
-
|
|
23942
|
-
|
|
23943
|
-
|
|
23944
|
-
|
|
23945
|
-
|
|
23946
|
-
|
|
23947
|
-
|
|
23948
|
-
|
|
23949
|
-
|
|
23950
|
-
|
|
23951
|
-
|
|
23952
|
-
|
|
23953
|
-
|
|
23954
|
-
|
|
23955
|
-
|
|
23956
|
-
|
|
23957
|
-
|
|
23958
|
-
|
|
23959
|
-
|
|
23960
|
-
|
|
23961
|
-
|
|
23962
|
-
|
|
23963
|
-
|
|
23964
|
-
|
|
23965
|
-
|
|
23966
|
-
|
|
23967
|
-
|
|
23968
|
-
|
|
23969
|
-
|
|
23970
|
-
|
|
23971
|
-
|
|
23972
|
-
|
|
23973
|
-
|
|
23974
|
-
|
|
23975
|
-
|
|
23976
|
-
|
|
23977
|
-
|
|
23978
|
-
|
|
23979
|
-
|
|
23980
|
-
|
|
23981
|
-
|
|
23982
|
-
|
|
23983
|
-
|
|
23984
|
-
|
|
23985
|
-
|
|
23986
|
-
|
|
23987
|
-
|
|
23988
|
-
|
|
23989
|
-
|
|
23990
|
-
|
|
23991
|
-
|
|
23992
|
-
|
|
23993
|
-
|
|
23994
|
-
|
|
23995
|
-
|
|
23996
|
-
|
|
23997
|
-
|
|
23998
|
-
|
|
23999
|
-
|
|
24000
|
-
|
|
24001
|
-
|
|
24002
|
-
|
|
24003
|
-
|
|
24004
|
-
|
|
24005
|
-
|
|
24006
|
-
|
|
24007
|
-
|
|
24008
|
-
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
|
|
24019
|
-
|
|
24020
|
-
|
|
24021
|
-
|
|
24022
|
-
|
|
24023
|
-
|
|
24024
|
-
|
|
24025
|
-
|
|
24026
|
-
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
|
|
23527
|
+
var refractorCsharp = csharp_1;
|
|
23528
|
+
var cshtml_1 = cshtml;
|
|
23529
|
+
cshtml.displayName = 'cshtml';
|
|
23530
|
+
cshtml.aliases = ['razor'];
|
|
23531
|
+
function cshtml(Prism) {
|
|
23532
|
+
Prism.register(refractorCsharp)
|
|
23533
|
+
// Docs:
|
|
23534
|
+
// https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio
|
|
23535
|
+
// https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-5.0
|
|
23536
|
+
;(function (Prism) {
|
|
23537
|
+
var commentLike = /\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//
|
|
23538
|
+
.source;
|
|
23539
|
+
var stringLike =
|
|
23540
|
+
/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source +
|
|
23541
|
+
'|' +
|
|
23542
|
+
/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;
|
|
23543
|
+
/**
|
|
23544
|
+
* Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
|
|
23545
|
+
*
|
|
23546
|
+
* @param {string} pattern
|
|
23547
|
+
* @param {number} depthLog2
|
|
23548
|
+
* @returns {string}
|
|
23549
|
+
*/
|
|
23550
|
+
function nested(pattern, depthLog2) {
|
|
23551
|
+
for (var i = 0; i < depthLog2; i++) {
|
|
23552
|
+
pattern = pattern.replace(/<self>/g, function () {
|
|
23553
|
+
return '(?:' + pattern + ')'
|
|
23554
|
+
});
|
|
23555
|
+
}
|
|
23556
|
+
return pattern
|
|
23557
|
+
.replace(/<self>/g, '[^\\s\\S]')
|
|
23558
|
+
.replace(/<str>/g, '(?:' + stringLike + ')')
|
|
23559
|
+
.replace(/<comment>/g, '(?:' + commentLike + ')')
|
|
23560
|
+
}
|
|
23561
|
+
var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2);
|
|
23562
|
+
var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 2);
|
|
23563
|
+
var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2);
|
|
23564
|
+
var angle = nested(/<(?:[^<>'"@/]|<str>|<comment>|<self>)*>/.source, 2); // Note about the above bracket patterns:
|
|
23565
|
+
// They all ignore HTML expressions that might be in the C# code. This is a problem because HTML (like strings and
|
|
23566
|
+
// comments) is parsed differently. This is a huge problem because HTML might contain brackets and quotes which
|
|
23567
|
+
// messes up the bracket and string counting implemented by the above patterns.
|
|
23568
|
+
//
|
|
23569
|
+
// This problem is not fixable because 1) HTML expression are highly context sensitive and very difficult to detect
|
|
23570
|
+
// and 2) they require one capturing group at every nested level. See the `tagRegion` pattern to admire the
|
|
23571
|
+
// complexity of an HTML expression.
|
|
23572
|
+
//
|
|
23573
|
+
// To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
|
|
23574
|
+
// allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
|
|
23575
|
+
var tagAttrs =
|
|
23576
|
+
/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/
|
|
23577
|
+
.source;
|
|
23578
|
+
var tagContent = /(?!\d)[^\s>\/=$<%]+/.source + tagAttrs + /\s*\/?>/.source;
|
|
23579
|
+
var tagRegion =
|
|
23580
|
+
/\B@?/.source +
|
|
23581
|
+
'(?:' +
|
|
23582
|
+
/<([a-zA-Z][\w:]*)/.source +
|
|
23583
|
+
tagAttrs +
|
|
23584
|
+
/\s*>/.source +
|
|
23585
|
+
'(?:' +
|
|
23586
|
+
(/[^<]/.source +
|
|
23587
|
+
'|' + // all tags that are not the start tag
|
|
23588
|
+
// eslint-disable-next-line regexp/strict
|
|
23589
|
+
/<\/?(?!\1\b)/.source +
|
|
23590
|
+
tagContent +
|
|
23591
|
+
'|' + // nested start tag
|
|
23592
|
+
nested(
|
|
23593
|
+
// eslint-disable-next-line regexp/strict
|
|
23594
|
+
/<\1/.source +
|
|
23595
|
+
tagAttrs +
|
|
23596
|
+
/\s*>/.source +
|
|
23597
|
+
'(?:' +
|
|
23598
|
+
(/[^<]/.source +
|
|
23599
|
+
'|' + // all tags that are not the start tag
|
|
23600
|
+
// eslint-disable-next-line regexp/strict
|
|
23601
|
+
/<\/?(?!\1\b)/.source +
|
|
23602
|
+
tagContent +
|
|
23603
|
+
'|' +
|
|
23604
|
+
'<self>') +
|
|
23605
|
+
')*' + // eslint-disable-next-line regexp/strict
|
|
23606
|
+
/<\/\1\s*>/.source,
|
|
23607
|
+
2
|
|
23608
|
+
)) +
|
|
23609
|
+
')*' + // eslint-disable-next-line regexp/strict
|
|
23610
|
+
/<\/\1\s*>/.source +
|
|
23611
|
+
'|' +
|
|
23612
|
+
/</.source +
|
|
23613
|
+
tagContent +
|
|
23614
|
+
')'; // Now for the actual language definition(s):
|
|
23615
|
+
//
|
|
23616
|
+
// Razor as a language has 2 parts:
|
|
23617
|
+
// 1) CSHTML: A markup-like language that has been extended with inline C# code expressions and blocks.
|
|
23618
|
+
// 2) C#+HTML: A variant of C# that can contain CSHTML tags as expressions.
|
|
23619
|
+
//
|
|
23620
|
+
// In the below code, both CSHTML and C#+HTML will be create as separate language definitions that reference each
|
|
23621
|
+
// other. However, only CSHTML will be exported via `Prism.languages`.
|
|
23622
|
+
Prism.languages.cshtml = Prism.languages.extend('markup', {});
|
|
23623
|
+
var csharpWithHtml = Prism.languages.insertBefore(
|
|
23624
|
+
'csharp',
|
|
23625
|
+
'string',
|
|
23626
|
+
{
|
|
23627
|
+
html: {
|
|
23628
|
+
pattern: RegExp(tagRegion),
|
|
23629
|
+
greedy: true,
|
|
23630
|
+
inside: Prism.languages.cshtml
|
|
23631
|
+
}
|
|
23632
|
+
},
|
|
23633
|
+
{
|
|
23634
|
+
csharp: Prism.languages.extend('csharp', {})
|
|
23635
|
+
}
|
|
23636
|
+
);
|
|
23637
|
+
var cs = {
|
|
23638
|
+
pattern: /\S[\s\S]*/,
|
|
23639
|
+
alias: 'language-csharp',
|
|
23640
|
+
inside: csharpWithHtml
|
|
23641
|
+
};
|
|
23642
|
+
Prism.languages.insertBefore('cshtml', 'prolog', {
|
|
23643
|
+
'razor-comment': {
|
|
23644
|
+
pattern: /@\*[\s\S]*?\*@/,
|
|
23645
|
+
greedy: true,
|
|
23646
|
+
alias: 'comment'
|
|
23647
|
+
},
|
|
23648
|
+
block: {
|
|
23649
|
+
pattern: RegExp(
|
|
23650
|
+
/(^|[^@])@/.source +
|
|
23651
|
+
'(?:' +
|
|
23652
|
+
[
|
|
23653
|
+
// @{ ... }
|
|
23654
|
+
curly, // @code{ ... }
|
|
23655
|
+
/(?:code|functions)\s*/.source + curly, // @for (...) { ... }
|
|
23656
|
+
/(?:for|foreach|lock|switch|using|while)\s*/.source +
|
|
23657
|
+
round +
|
|
23658
|
+
/\s*/.source +
|
|
23659
|
+
curly, // @do { ... } while (...);
|
|
23660
|
+
/do\s*/.source +
|
|
23661
|
+
curly +
|
|
23662
|
+
/\s*while\s*/.source +
|
|
23663
|
+
round +
|
|
23664
|
+
/(?:\s*;)?/.source, // @try { ... } catch (...) { ... } finally { ... }
|
|
23665
|
+
/try\s*/.source +
|
|
23666
|
+
curly +
|
|
23667
|
+
/\s*catch\s*/.source +
|
|
23668
|
+
round +
|
|
23669
|
+
/\s*/.source +
|
|
23670
|
+
curly +
|
|
23671
|
+
/\s*finally\s*/.source +
|
|
23672
|
+
curly, // @if (...) {...} else if (...) {...} else {...}
|
|
23673
|
+
/if\s*/.source +
|
|
23674
|
+
round +
|
|
23675
|
+
/\s*/.source +
|
|
23676
|
+
curly +
|
|
23677
|
+
'(?:' +
|
|
23678
|
+
/\s*else/.source +
|
|
23679
|
+
'(?:' +
|
|
23680
|
+
/\s+if\s*/.source +
|
|
23681
|
+
round +
|
|
23682
|
+
')?' +
|
|
23683
|
+
/\s*/.source +
|
|
23684
|
+
curly +
|
|
23685
|
+
')*'
|
|
23686
|
+
].join('|') +
|
|
23687
|
+
')'
|
|
23688
|
+
),
|
|
23689
|
+
lookbehind: true,
|
|
23690
|
+
greedy: true,
|
|
23691
|
+
inside: {
|
|
23692
|
+
keyword: /^@\w*/,
|
|
23693
|
+
csharp: cs
|
|
23694
|
+
}
|
|
23695
|
+
},
|
|
23696
|
+
directive: {
|
|
23697
|
+
pattern:
|
|
23698
|
+
/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,
|
|
23699
|
+
lookbehind: true,
|
|
23700
|
+
greedy: true,
|
|
23701
|
+
inside: {
|
|
23702
|
+
keyword: /^@\w+/,
|
|
23703
|
+
csharp: cs
|
|
23704
|
+
}
|
|
23705
|
+
},
|
|
23706
|
+
value: {
|
|
23707
|
+
pattern: RegExp(
|
|
23708
|
+
/(^|[^@])@/.source +
|
|
23709
|
+
/(?:await\b\s*)?/.source +
|
|
23710
|
+
'(?:' +
|
|
23711
|
+
/\w+\b/.source +
|
|
23712
|
+
'|' +
|
|
23713
|
+
round +
|
|
23714
|
+
')' +
|
|
23715
|
+
'(?:' +
|
|
23716
|
+
/[?!]?\.\w+\b/.source +
|
|
23717
|
+
'|' +
|
|
23718
|
+
round +
|
|
23719
|
+
'|' +
|
|
23720
|
+
square +
|
|
23721
|
+
'|' +
|
|
23722
|
+
angle +
|
|
23723
|
+
round +
|
|
23724
|
+
')*'
|
|
23725
|
+
),
|
|
23726
|
+
lookbehind: true,
|
|
23727
|
+
greedy: true,
|
|
23728
|
+
alias: 'variable',
|
|
23729
|
+
inside: {
|
|
23730
|
+
keyword: /^@/,
|
|
23731
|
+
csharp: cs
|
|
23732
|
+
}
|
|
23733
|
+
},
|
|
23734
|
+
'delegate-operator': {
|
|
23735
|
+
pattern: /(^|[^@])@(?=<)/,
|
|
23736
|
+
lookbehind: true,
|
|
23737
|
+
alias: 'operator'
|
|
23738
|
+
}
|
|
23739
|
+
});
|
|
23740
|
+
Prism.languages.razor = Prism.languages.cshtml;
|
|
23741
|
+
})(Prism);
|
|
24031
23742
|
}
|
|
24032
23743
|
|
|
24033
|
-
var
|
|
24034
|
-
|
|
24035
|
-
|
|
24036
|
-
function
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
24040
|
-
|
|
24041
|
-
|
|
24042
|
-
|
|
24043
|
-
|
|
24044
|
-
|
|
24045
|
-
|
|
24046
|
-
|
|
24047
|
-
|
|
24048
|
-
|
|
24049
|
-
|
|
24050
|
-
|
|
23744
|
+
var csp_1 = csp;
|
|
23745
|
+
csp.displayName = 'csp';
|
|
23746
|
+
csp.aliases = [];
|
|
23747
|
+
function csp(Prism) {
|
|
23748
|
+
(function (Prism) {
|
|
23749
|
+
/**
|
|
23750
|
+
* @param {string} source
|
|
23751
|
+
* @returns {RegExp}
|
|
23752
|
+
*/
|
|
23753
|
+
function value(source) {
|
|
23754
|
+
return RegExp(
|
|
23755
|
+
/([ \t])/.source + '(?:' + source + ')' + /(?=[\s;]|$)/.source,
|
|
23756
|
+
'i'
|
|
23757
|
+
)
|
|
23758
|
+
}
|
|
23759
|
+
Prism.languages.csp = {
|
|
23760
|
+
directive: {
|
|
23761
|
+
pattern:
|
|
23762
|
+
/(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,
|
|
23763
|
+
lookbehind: true,
|
|
23764
|
+
alias: 'property'
|
|
23765
|
+
},
|
|
23766
|
+
scheme: {
|
|
23767
|
+
pattern: value(/[a-z][a-z0-9.+-]*:/.source),
|
|
23768
|
+
lookbehind: true
|
|
23769
|
+
},
|
|
23770
|
+
none: {
|
|
23771
|
+
pattern: value(/'none'/.source),
|
|
23772
|
+
lookbehind: true,
|
|
23773
|
+
alias: 'keyword'
|
|
23774
|
+
},
|
|
23775
|
+
nonce: {
|
|
23776
|
+
pattern: value(/'nonce-[-+/\w=]+'/.source),
|
|
23777
|
+
lookbehind: true,
|
|
23778
|
+
alias: 'number'
|
|
23779
|
+
},
|
|
23780
|
+
hash: {
|
|
23781
|
+
pattern: value(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
|
|
23782
|
+
lookbehind: true,
|
|
23783
|
+
alias: 'number'
|
|
23784
|
+
},
|
|
23785
|
+
host: {
|
|
23786
|
+
pattern: value(
|
|
23787
|
+
/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source +
|
|
23788
|
+
'|' +
|
|
23789
|
+
/\*[^\s;,']*/.source +
|
|
23790
|
+
'|' +
|
|
23791
|
+
/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source
|
|
23792
|
+
),
|
|
23793
|
+
lookbehind: true,
|
|
23794
|
+
alias: 'url',
|
|
23795
|
+
inside: {
|
|
23796
|
+
important: /\*/
|
|
23797
|
+
}
|
|
23798
|
+
},
|
|
23799
|
+
keyword: [
|
|
23800
|
+
{
|
|
23801
|
+
pattern: value(/'unsafe-[a-z-]+'/.source),
|
|
23802
|
+
lookbehind: true,
|
|
23803
|
+
alias: 'unsafe'
|
|
23804
|
+
},
|
|
23805
|
+
{
|
|
23806
|
+
pattern: value(/'[a-z-]+'/.source),
|
|
23807
|
+
lookbehind: true,
|
|
23808
|
+
alias: 'safe'
|
|
23809
|
+
}
|
|
23810
|
+
],
|
|
23811
|
+
punctuation: /;/
|
|
23812
|
+
};
|
|
23813
|
+
})(Prism);
|
|
24051
23814
|
}
|
|
24052
23815
|
|
|
24053
|
-
var
|
|
24054
|
-
|
|
24055
|
-
|
|
24056
|
-
function
|
|
24057
|
-
|
|
24058
|
-
|
|
24059
|
-
|
|
24060
|
-
|
|
24061
|
-
|
|
24062
|
-
|
|
24063
|
-
|
|
24064
|
-
|
|
24065
|
-
|
|
24066
|
-
|
|
24067
|
-
|
|
24068
|
-
|
|
24069
|
-
|
|
24070
|
-
|
|
24071
|
-
|
|
24072
|
-
|
|
24073
|
-
|
|
24074
|
-
|
|
24075
|
-
|
|
24076
|
-
|
|
24077
|
-
|
|
24078
|
-
|
|
24079
|
-
|
|
24080
|
-
|
|
24081
|
-
|
|
24082
|
-
|
|
24083
|
-
|
|
24084
|
-
|
|
24085
|
-
|
|
24086
|
-
|
|
24087
|
-
|
|
24088
|
-
|
|
24089
|
-
|
|
24090
|
-
|
|
24091
|
-
|
|
24092
|
-
|
|
24093
|
-
|
|
24094
|
-
|
|
24095
|
-
|
|
24096
|
-
|
|
24097
|
-
|
|
24098
|
-
|
|
24099
|
-
|
|
23816
|
+
var cssExtras_1 = cssExtras;
|
|
23817
|
+
cssExtras.displayName = 'cssExtras';
|
|
23818
|
+
cssExtras.aliases = [];
|
|
23819
|
+
function cssExtras(Prism) {
|
|
23820
|
+
(function (Prism) {
|
|
23821
|
+
var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;
|
|
23822
|
+
var selectorInside;
|
|
23823
|
+
Prism.languages.css.selector = {
|
|
23824
|
+
pattern: Prism.languages.css.selector.pattern,
|
|
23825
|
+
lookbehind: true,
|
|
23826
|
+
inside: (selectorInside = {
|
|
23827
|
+
'pseudo-element':
|
|
23828
|
+
/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,
|
|
23829
|
+
'pseudo-class': /:[-\w]+/,
|
|
23830
|
+
class: /\.[-\w]+/,
|
|
23831
|
+
id: /#[-\w]+/,
|
|
23832
|
+
attribute: {
|
|
23833
|
+
pattern: RegExp('\\[(?:[^[\\]"\']|' + string.source + ')*\\]'),
|
|
23834
|
+
greedy: true,
|
|
23835
|
+
inside: {
|
|
23836
|
+
punctuation: /^\[|\]$/,
|
|
23837
|
+
'case-sensitivity': {
|
|
23838
|
+
pattern: /(\s)[si]$/i,
|
|
23839
|
+
lookbehind: true,
|
|
23840
|
+
alias: 'keyword'
|
|
23841
|
+
},
|
|
23842
|
+
namespace: {
|
|
23843
|
+
pattern: /^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,
|
|
23844
|
+
lookbehind: true,
|
|
23845
|
+
inside: {
|
|
23846
|
+
punctuation: /\|$/
|
|
23847
|
+
}
|
|
23848
|
+
},
|
|
23849
|
+
'attr-name': {
|
|
23850
|
+
pattern: /^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,
|
|
23851
|
+
lookbehind: true
|
|
23852
|
+
},
|
|
23853
|
+
'attr-value': [
|
|
23854
|
+
string,
|
|
23855
|
+
{
|
|
23856
|
+
pattern: /(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,
|
|
23857
|
+
lookbehind: true
|
|
23858
|
+
}
|
|
23859
|
+
],
|
|
23860
|
+
operator: /[|~*^$]?=/
|
|
23861
|
+
}
|
|
23862
|
+
},
|
|
23863
|
+
'n-th': [
|
|
23864
|
+
{
|
|
23865
|
+
pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,
|
|
23866
|
+
lookbehind: true,
|
|
23867
|
+
inside: {
|
|
23868
|
+
number: /[\dn]+/,
|
|
23869
|
+
operator: /[+-]/
|
|
23870
|
+
}
|
|
23871
|
+
},
|
|
23872
|
+
{
|
|
23873
|
+
pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i,
|
|
23874
|
+
lookbehind: true
|
|
23875
|
+
}
|
|
23876
|
+
],
|
|
23877
|
+
combinator: />|\+|~|\|\|/,
|
|
23878
|
+
// the `tag` token has been existed and removed.
|
|
23879
|
+
// because we can't find a perfect tokenize to match it.
|
|
23880
|
+
// if you want to add it, please read https://github.com/PrismJS/prism/pull/2373 first.
|
|
23881
|
+
punctuation: /[(),]/
|
|
23882
|
+
})
|
|
23883
|
+
};
|
|
23884
|
+
Prism.languages.css['atrule'].inside['selector-function-argument'].inside =
|
|
23885
|
+
selectorInside;
|
|
23886
|
+
Prism.languages.insertBefore('css', 'property', {
|
|
23887
|
+
variable: {
|
|
23888
|
+
pattern:
|
|
23889
|
+
/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,
|
|
23890
|
+
lookbehind: true
|
|
23891
|
+
}
|
|
23892
|
+
});
|
|
23893
|
+
var unit = {
|
|
23894
|
+
pattern: /(\b\d+)(?:%|[a-z]+(?![\w-]))/,
|
|
23895
|
+
lookbehind: true
|
|
23896
|
+
}; // 123 -123 .123 -.123 12.3 -12.3
|
|
23897
|
+
var number = {
|
|
23898
|
+
pattern: /(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,
|
|
23899
|
+
lookbehind: true
|
|
23900
|
+
};
|
|
23901
|
+
Prism.languages.insertBefore('css', 'function', {
|
|
23902
|
+
operator: {
|
|
23903
|
+
pattern: /(\s)[+\-*\/](?=\s)/,
|
|
23904
|
+
lookbehind: true
|
|
23905
|
+
},
|
|
23906
|
+
// CAREFUL!
|
|
23907
|
+
// Previewers and Inline color use hexcode and color.
|
|
23908
|
+
hexcode: {
|
|
23909
|
+
pattern: /\B#[\da-f]{3,8}\b/i,
|
|
23910
|
+
alias: 'color'
|
|
23911
|
+
},
|
|
23912
|
+
color: [
|
|
23913
|
+
{
|
|
23914
|
+
pattern:
|
|
23915
|
+
/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,
|
|
23916
|
+
lookbehind: true
|
|
23917
|
+
},
|
|
23918
|
+
{
|
|
23919
|
+
pattern:
|
|
23920
|
+
/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,
|
|
23921
|
+
inside: {
|
|
23922
|
+
unit: unit,
|
|
23923
|
+
number: number,
|
|
23924
|
+
function: /[\w-]+(?=\()/,
|
|
23925
|
+
punctuation: /[(),]/
|
|
23926
|
+
}
|
|
23927
|
+
}
|
|
23928
|
+
],
|
|
23929
|
+
// it's important that there is no boundary assertion after the hex digits
|
|
23930
|
+
entity: /\\[\da-f]{1,8}/i,
|
|
23931
|
+
unit: unit,
|
|
23932
|
+
number: number
|
|
23933
|
+
});
|
|
23934
|
+
})(Prism);
|
|
24100
23935
|
}
|
|
24101
23936
|
|
|
24102
|
-
var
|
|
24103
|
-
|
|
23937
|
+
var csv_1 = csv;
|
|
23938
|
+
csv.displayName = 'csv';
|
|
23939
|
+
csv.aliases = [];
|
|
23940
|
+
function csv(Prism) {
|
|
23941
|
+
// https://tools.ietf.org/html/rfc4180
|
|
23942
|
+
Prism.languages.csv = {
|
|
23943
|
+
value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
|
|
23944
|
+
punctuation: /,/
|
|
23945
|
+
};
|
|
23946
|
+
}
|
|
24104
23947
|
|
|
24105
|
-
|
|
24106
|
-
|
|
24107
|
-
|
|
23948
|
+
var cypher_1 = cypher;
|
|
23949
|
+
cypher.displayName = 'cypher';
|
|
23950
|
+
cypher.aliases = [];
|
|
23951
|
+
function cypher(Prism) {
|
|
23952
|
+
Prism.languages.cypher = {
|
|
23953
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/comments/
|
|
23954
|
+
comment: /\/\/.*/,
|
|
23955
|
+
string: {
|
|
23956
|
+
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,
|
|
23957
|
+
greedy: true
|
|
23958
|
+
},
|
|
23959
|
+
'class-name': {
|
|
23960
|
+
pattern: /(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,
|
|
23961
|
+
lookbehind: true,
|
|
23962
|
+
greedy: true
|
|
23963
|
+
},
|
|
23964
|
+
relationship: {
|
|
23965
|
+
pattern:
|
|
23966
|
+
/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,
|
|
23967
|
+
lookbehind: true,
|
|
23968
|
+
greedy: true,
|
|
23969
|
+
alias: 'property'
|
|
23970
|
+
},
|
|
23971
|
+
identifier: {
|
|
23972
|
+
pattern: /`(?:[^`\\\r\n])*`/,
|
|
23973
|
+
greedy: true
|
|
23974
|
+
},
|
|
23975
|
+
variable: /\$\w+/,
|
|
23976
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/reserved/
|
|
23977
|
+
keyword:
|
|
23978
|
+
/\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,
|
|
23979
|
+
function: /\b\w+\b(?=\s*\()/,
|
|
23980
|
+
boolean: /\b(?:false|null|true)\b/i,
|
|
23981
|
+
number: /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,
|
|
23982
|
+
// https://neo4j.com/docs/cypher-manual/current/syntax/operators/
|
|
23983
|
+
operator: /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,
|
|
23984
|
+
punctuation: /[()[\]{},;.]/
|
|
23985
|
+
};
|
|
23986
|
+
}
|
|
24108
23987
|
|
|
24109
|
-
|
|
24110
|
-
|
|
24111
|
-
|
|
24112
|
-
|
|
24113
|
-
|
|
24114
|
-
|
|
24115
|
-
|
|
24116
|
-
|
|
24117
|
-
|
|
24118
|
-
|
|
24119
|
-
|
|
24120
|
-
|
|
24121
|
-
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
|
|
24136
|
-
|
|
24137
|
-
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24142
|
-
|
|
24143
|
-
|
|
24144
|
-
|
|
24145
|
-
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24168
|
-
|
|
24169
|
-
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24176
|
-
|
|
24177
|
-
|
|
24178
|
-
|
|
24179
|
-
|
|
24180
|
-
|
|
24181
|
-
|
|
24182
|
-
|
|
24183
|
-
|
|
24184
|
-
|
|
24185
|
-
|
|
24186
|
-
|
|
24187
|
-
|
|
24188
|
-
|
|
24189
|
-
|
|
24190
|
-
|
|
24191
|
-
|
|
24192
|
-
|
|
24193
|
-
}
|
|
24194
|
-
return d_1;
|
|
23988
|
+
var d_1 = d;
|
|
23989
|
+
d.displayName = 'd';
|
|
23990
|
+
d.aliases = [];
|
|
23991
|
+
function d(Prism) {
|
|
23992
|
+
Prism.languages.d = Prism.languages.extend('clike', {
|
|
23993
|
+
comment: [
|
|
23994
|
+
{
|
|
23995
|
+
// Shebang
|
|
23996
|
+
pattern: /^\s*#!.+/,
|
|
23997
|
+
greedy: true
|
|
23998
|
+
},
|
|
23999
|
+
{
|
|
24000
|
+
pattern: RegExp(
|
|
24001
|
+
/(^|[^\\])/.source +
|
|
24002
|
+
'(?:' +
|
|
24003
|
+
[
|
|
24004
|
+
// /+ comment +/
|
|
24005
|
+
// Allow one level of nesting
|
|
24006
|
+
/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source, // // comment
|
|
24007
|
+
/\/\/.*/.source, // /* comment */
|
|
24008
|
+
/\/\*[\s\S]*?\*\//.source
|
|
24009
|
+
].join('|') +
|
|
24010
|
+
')'
|
|
24011
|
+
),
|
|
24012
|
+
lookbehind: true,
|
|
24013
|
+
greedy: true
|
|
24014
|
+
}
|
|
24015
|
+
],
|
|
24016
|
+
string: [
|
|
24017
|
+
{
|
|
24018
|
+
pattern: RegExp(
|
|
24019
|
+
[
|
|
24020
|
+
// r"", x""
|
|
24021
|
+
/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source, // q"[]", q"()", q"<>", q"{}"
|
|
24022
|
+
/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source, // q"IDENT
|
|
24023
|
+
// ...
|
|
24024
|
+
// IDENT"
|
|
24025
|
+
/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source, // q"//", q"||", etc.
|
|
24026
|
+
// eslint-disable-next-line regexp/strict
|
|
24027
|
+
/\bq"(.)[\s\S]*?\2"/.source, // eslint-disable-next-line regexp/strict
|
|
24028
|
+
/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source
|
|
24029
|
+
].join('|'),
|
|
24030
|
+
'm'
|
|
24031
|
+
),
|
|
24032
|
+
greedy: true
|
|
24033
|
+
},
|
|
24034
|
+
{
|
|
24035
|
+
pattern: /\bq\{(?:\{[^{}]*\}|[^{}])*\}/,
|
|
24036
|
+
greedy: true,
|
|
24037
|
+
alias: 'token-string'
|
|
24038
|
+
}
|
|
24039
|
+
],
|
|
24040
|
+
// In order: $, keywords and special tokens, globally defined symbols
|
|
24041
|
+
keyword:
|
|
24042
|
+
/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,
|
|
24043
|
+
number: [
|
|
24044
|
+
// The lookbehind and the negative look-ahead try to prevent bad highlighting of the .. operator
|
|
24045
|
+
// Hexadecimal numbers must be handled separately to avoid problems with exponent "e"
|
|
24046
|
+
/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,
|
|
24047
|
+
{
|
|
24048
|
+
pattern:
|
|
24049
|
+
/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,
|
|
24050
|
+
lookbehind: true
|
|
24051
|
+
}
|
|
24052
|
+
],
|
|
24053
|
+
operator:
|
|
24054
|
+
/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/
|
|
24055
|
+
});
|
|
24056
|
+
Prism.languages.insertBefore('d', 'string', {
|
|
24057
|
+
// Characters
|
|
24058
|
+
// 'a', '\\', '\n', '\xFF', '\377', '\uFFFF', '\U0010FFFF', '\quot'
|
|
24059
|
+
char: /'(?:\\(?:\W|\w+)|[^\\])'/
|
|
24060
|
+
});
|
|
24061
|
+
Prism.languages.insertBefore('d', 'keyword', {
|
|
24062
|
+
property: /\B@\w*/
|
|
24063
|
+
});
|
|
24064
|
+
Prism.languages.insertBefore('d', 'function', {
|
|
24065
|
+
register: {
|
|
24066
|
+
// Iasm registers
|
|
24067
|
+
pattern:
|
|
24068
|
+
/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,
|
|
24069
|
+
alias: 'variable'
|
|
24070
|
+
}
|
|
24071
|
+
});
|
|
24195
24072
|
}
|
|
24196
24073
|
|
|
24197
24074
|
var dart_1;
|
|
@@ -25364,7 +25241,7 @@ var hasRequiredErb;
|
|
|
25364
25241
|
function requireErb () {
|
|
25365
25242
|
if (hasRequiredErb) return erb_1;
|
|
25366
25243
|
hasRequiredErb = 1;
|
|
25367
|
-
var refractorRuby =
|
|
25244
|
+
var refractorRuby = ruby_1;
|
|
25368
25245
|
var refractorMarkupTemplating = requireMarkupTemplating();
|
|
25369
25246
|
erb_1 = erb;
|
|
25370
25247
|
erb.displayName = 'erb';
|
|
@@ -27846,7 +27723,7 @@ var hasRequiredHaml;
|
|
|
27846
27723
|
function requireHaml () {
|
|
27847
27724
|
if (hasRequiredHaml) return haml_1;
|
|
27848
27725
|
hasRequiredHaml = 1;
|
|
27849
|
-
var refractorRuby =
|
|
27726
|
+
var refractorRuby = ruby_1;
|
|
27850
27727
|
haml_1 = haml;
|
|
27851
27728
|
haml.displayName = 'haml';
|
|
27852
27729
|
haml.aliases = [];
|
|
@@ -40282,7 +40159,7 @@ function requireT4Cs () {
|
|
|
40282
40159
|
if (hasRequiredT4Cs) return t4Cs_1;
|
|
40283
40160
|
hasRequiredT4Cs = 1;
|
|
40284
40161
|
var refractorT4Templating = requireT4Templating();
|
|
40285
|
-
var refractorCsharp =
|
|
40162
|
+
var refractorCsharp = csharp_1;
|
|
40286
40163
|
t4Cs_1 = t4Cs;
|
|
40287
40164
|
t4Cs.displayName = 't4Cs';
|
|
40288
40165
|
t4Cs.aliases = [];
|
|
@@ -43059,19 +42936,19 @@ refractor.register(chaiscript_1);
|
|
|
43059
42936
|
refractor.register(cil_1);
|
|
43060
42937
|
refractor.register(clojure_1);
|
|
43061
42938
|
refractor.register(cmake_1);
|
|
43062
|
-
refractor.register(
|
|
43063
|
-
refractor.register(
|
|
43064
|
-
refractor.register(
|
|
43065
|
-
refractor.register(
|
|
43066
|
-
refractor.register(
|
|
43067
|
-
refractor.register(
|
|
43068
|
-
refractor.register(
|
|
43069
|
-
refractor.register(
|
|
43070
|
-
refractor.register(
|
|
43071
|
-
refractor.register(
|
|
43072
|
-
refractor.register(
|
|
43073
|
-
refractor.register(
|
|
43074
|
-
refractor.register(
|
|
42939
|
+
refractor.register(cobol_1);
|
|
42940
|
+
refractor.register(coffeescript_1);
|
|
42941
|
+
refractor.register(concurnas_1);
|
|
42942
|
+
refractor.register(coq_1);
|
|
42943
|
+
refractor.register(cpp_1);
|
|
42944
|
+
refractor.register(crystal_1);
|
|
42945
|
+
refractor.register(csharp_1);
|
|
42946
|
+
refractor.register(cshtml_1);
|
|
42947
|
+
refractor.register(csp_1);
|
|
42948
|
+
refractor.register(cssExtras_1);
|
|
42949
|
+
refractor.register(csv_1);
|
|
42950
|
+
refractor.register(cypher_1);
|
|
42951
|
+
refractor.register(d_1);
|
|
43075
42952
|
refractor.register(requireDart());
|
|
43076
42953
|
refractor.register(requireDataweave());
|
|
43077
42954
|
refractor.register(requireDax());
|
|
@@ -43230,7 +43107,7 @@ refractor.register(requireRest());
|
|
|
43230
43107
|
refractor.register(requireRip());
|
|
43231
43108
|
refractor.register(requireRoboconf());
|
|
43232
43109
|
refractor.register(requireRobotframework());
|
|
43233
|
-
refractor.register(
|
|
43110
|
+
refractor.register(ruby_1);
|
|
43234
43111
|
refractor.register(requireRust());
|
|
43235
43112
|
refractor.register(requireSas());
|
|
43236
43113
|
refractor.register(requireSass());
|
|
@@ -47632,8 +47509,8 @@ TableCell.defaultProps = _objectSpread2(_objectSpread2({}, BaseCell.defaultProps
|
|
|
47632
47509
|
onSort: function onSort() {}
|
|
47633
47510
|
});
|
|
47634
47511
|
|
|
47635
|
-
var css$x = ".
|
|
47636
|
-
var modules_f6618a87 = {"root":"
|
|
47512
|
+
var css$x = ".TableRow_module_root__56f50f2c {\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c {\n background: var(--grey6);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c {\n background: transparent;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_headerRow__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] {\n width: 3rem;\n visibility: hidden;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c {\n background: var(--white);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c > [data-elem=base-cell] {\n background: var(--white);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c:hover > [data-elem=base-cell] {\n background: var(--info-bg);\n}\n.TableRow_module_root__56f50f2c.TableRow_module_bodyRow__56f50f2c[data-active=true] > [data-elem=base-cell] {\n background: var(--background);\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell]:first-child {\n padding-left: 1rem;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell]:last-child {\n padding-right: 1rem;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_rowHeightMd__56f50f2c > td[data-elem=base-cell] {\n height: 3rem;\n}\n.TableRow_module_root__56f50f2c.TableRow_module_rowHeightLg__56f50f2c > td[data-elem=base-cell] {\n height: 4rem;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c {\n padding-left: 0.9rem;\n padding-right: 0.1rem;\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] {\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c > [data-elem=base-cell].TableRow_module_expandableCell__56f50f2c > [data-elem=component2] > [data-elem=text] {\n overflow: visible;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell] .TableRow_module_icon__56f50f2c {\n width: 1.5rem;\n height: 1.5rem;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell]:disabled {\n cursor: default;\n}\n.TableRow_module_root__56f50f2c button.TableRow_module_button__56f50f2c[data-elem=base-cell]:disabled .TableRow_module_icon__56f50f2c {\n visibility: hidden;\n}\n.TableRow_module_root__56f50f2c .TableRow_module_expanded__56f50f2c .TableRow_module_button__56f50f2c .TableRow_module_icon__56f50f2c {\n transform: rotate(180deg);\n}";
|
|
47513
|
+
var modules_f6618a87 = {"root":"TableRow_module_root__56f50f2c","header-row":"TableRow_module_headerRow__56f50f2c","expandable-cell":"TableRow_module_expandableCell__56f50f2c","body-row":"TableRow_module_bodyRow__56f50f2c","row-height-md":"TableRow_module_rowHeightMd__56f50f2c","row-height-lg":"TableRow_module_rowHeightLg__56f50f2c","button":"TableRow_module_button__56f50f2c","icon":"TableRow_module_icon__56f50f2c","expanded":"TableRow_module_expanded__56f50f2c"};
|
|
47637
47514
|
n(css$x,{});
|
|
47638
47515
|
|
|
47639
47516
|
var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
@@ -47652,6 +47529,19 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
47652
47529
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47653
47530
|
expanded = _useState2[0],
|
|
47654
47531
|
setExpanded = _useState2[1];
|
|
47532
|
+
var expandableProps = Expandable ? {
|
|
47533
|
+
_expanded: expanded,
|
|
47534
|
+
_setExpanded: setExpanded,
|
|
47535
|
+
disabled: !Expandable({
|
|
47536
|
+
datum: datum,
|
|
47537
|
+
index: _index
|
|
47538
|
+
}),
|
|
47539
|
+
onClick: function onClick() {
|
|
47540
|
+
setExpanded(function (prev) {
|
|
47541
|
+
return !prev;
|
|
47542
|
+
});
|
|
47543
|
+
}
|
|
47544
|
+
} : {};
|
|
47655
47545
|
var tableCells = headerData === null || headerData === void 0 ? void 0 : (_headerData$map = headerData.map) === null || _headerData$map === void 0 ? void 0 : _headerData$map.call(headerData, function (item) {
|
|
47656
47546
|
var _getCustomCell;
|
|
47657
47547
|
var cellContent = null;
|
|
@@ -47662,6 +47552,7 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
47662
47552
|
}
|
|
47663
47553
|
var cellProps = _objectSpread2(_objectSpread2(_objectSpread2({}, props), item), {}, {
|
|
47664
47554
|
_index: _index,
|
|
47555
|
+
expandableProps: expandableProps,
|
|
47665
47556
|
setActiveId: setActiveId,
|
|
47666
47557
|
key: item.id,
|
|
47667
47558
|
datum: datum,
|
|
@@ -47684,38 +47575,12 @@ var TableRow = /*#__PURE__*/React.forwardRef(function BaseTable(props, ref) {
|
|
|
47684
47575
|
);
|
|
47685
47576
|
});
|
|
47686
47577
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
47687
|
-
children: [/*#__PURE__*/jsxRuntime.
|
|
47578
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
47688
47579
|
ref: ref,
|
|
47689
47580
|
tabIndex: -1,
|
|
47690
47581
|
"data-elem": "table-row",
|
|
47691
|
-
className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)]
|
|
47692
|
-
children:
|
|
47693
|
-
className: classes(modules_f6618a87['expandable-cell'], expanded ? modules_f6618a87.expanded : ''),
|
|
47694
|
-
size: "auto",
|
|
47695
|
-
cellContent: null
|
|
47696
|
-
}), Expandable && type === 'body' && /*#__PURE__*/jsxRuntime.jsx(TableCell, {
|
|
47697
|
-
className: classes(modules_f6618a87['expandable-cell'], expanded ? modules_f6618a87.expanded : ''),
|
|
47698
|
-
size: "auto",
|
|
47699
|
-
cellContent: /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
47700
|
-
className: modules_f6618a87.button,
|
|
47701
|
-
size: "auto",
|
|
47702
|
-
variant: "text",
|
|
47703
|
-
disabled: !Expandable({
|
|
47704
|
-
datum: datum,
|
|
47705
|
-
index: _index
|
|
47706
|
-
}),
|
|
47707
|
-
onClick: function onClick() {
|
|
47708
|
-
setExpanded(function (prev) {
|
|
47709
|
-
return !prev;
|
|
47710
|
-
});
|
|
47711
|
-
},
|
|
47712
|
-
leftComponent: function leftComponent() {
|
|
47713
|
-
return /*#__PURE__*/jsxRuntime.jsx(Caret, {
|
|
47714
|
-
className: modules_f6618a87.icon
|
|
47715
|
-
});
|
|
47716
|
-
}
|
|
47717
|
-
})
|
|
47718
|
-
}), tableCells]
|
|
47582
|
+
className: classes(className, modules_f6618a87.root, modules_f6618a87["".concat(type, "-row")], modules_f6618a87["row-height-".concat(rowHeight)]),
|
|
47583
|
+
children: tableCells
|
|
47719
47584
|
}), Expandable && expanded && /*#__PURE__*/jsxRuntime.jsx("tr", {
|
|
47720
47585
|
children: /*#__PURE__*/jsxRuntime.jsx(Expandable, {
|
|
47721
47586
|
datum: datum,
|