@banyan_cloud/roots 1.0.91 → 1.0.92
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 +1501 -1399
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1501 -1399
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +1501 -1399
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -20527,126 +20527,134 @@ function c(Prism) {
|
|
|
20527
20527
|
delete Prism.languages.c['boolean'];
|
|
20528
20528
|
}
|
|
20529
20529
|
|
|
20530
|
-
var
|
|
20531
|
-
var
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20536
|
-
|
|
20537
|
-
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
|
|
20541
|
-
|
|
20542
|
-
|
|
20543
|
-
|
|
20544
|
-
|
|
20545
|
-
|
|
20546
|
-
|
|
20547
|
-
|
|
20548
|
-
|
|
20549
|
-
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20554
|
-
|
|
20555
|
-
|
|
20556
|
-
|
|
20557
|
-
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
|
|
20563
|
-
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
20567
|
-
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
|
|
20573
|
-
|
|
20574
|
-
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20586
|
-
|
|
20587
|
-
|
|
20588
|
-
|
|
20589
|
-
|
|
20590
|
-
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
|
|
20602
|
-
|
|
20603
|
-
|
|
20604
|
-
|
|
20605
|
-
|
|
20606
|
-
|
|
20607
|
-
|
|
20608
|
-
|
|
20609
|
-
|
|
20610
|
-
|
|
20611
|
-
|
|
20612
|
-
|
|
20613
|
-
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
|
|
20623
|
-
|
|
20624
|
-
|
|
20625
|
-
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20637
|
-
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20530
|
+
var cpp_1;
|
|
20531
|
+
var hasRequiredCpp;
|
|
20532
|
+
|
|
20533
|
+
function requireCpp () {
|
|
20534
|
+
if (hasRequiredCpp) return cpp_1;
|
|
20535
|
+
hasRequiredCpp = 1;
|
|
20536
|
+
var refractorC = c_1;
|
|
20537
|
+
cpp_1 = cpp;
|
|
20538
|
+
cpp.displayName = 'cpp';
|
|
20539
|
+
cpp.aliases = [];
|
|
20540
|
+
function cpp(Prism) {
|
|
20541
|
+
Prism.register(refractorC)
|
|
20542
|
+
;(function (Prism) {
|
|
20543
|
+
var keyword =
|
|
20544
|
+
/\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/;
|
|
20545
|
+
var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
|
|
20546
|
+
/<keyword>/g,
|
|
20547
|
+
function () {
|
|
20548
|
+
return keyword.source
|
|
20549
|
+
}
|
|
20550
|
+
);
|
|
20551
|
+
Prism.languages.cpp = Prism.languages.extend('c', {
|
|
20552
|
+
'class-name': [
|
|
20553
|
+
{
|
|
20554
|
+
pattern: RegExp(
|
|
20555
|
+
/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
|
|
20556
|
+
/<keyword>/g,
|
|
20557
|
+
function () {
|
|
20558
|
+
return keyword.source
|
|
20559
|
+
}
|
|
20560
|
+
)
|
|
20561
|
+
),
|
|
20562
|
+
lookbehind: true
|
|
20563
|
+
}, // This is intended to capture the class name of method implementations like:
|
|
20564
|
+
// void foo::bar() const {}
|
|
20565
|
+
// However! The `foo` in the above example could also be a namespace, so we only capture the class name if
|
|
20566
|
+
// it starts with an uppercase letter. This approximation should give decent results.
|
|
20567
|
+
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
|
|
20568
|
+
// Foo::~Foo() {}
|
|
20569
|
+
/\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
|
|
20570
|
+
// parameters, so it can't be a namespace (until C++ adds generic namespaces).
|
|
20571
|
+
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
|
20572
|
+
],
|
|
20573
|
+
keyword: keyword,
|
|
20574
|
+
number: {
|
|
20575
|
+
pattern:
|
|
20576
|
+
/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
|
20577
|
+
greedy: true
|
|
20578
|
+
},
|
|
20579
|
+
operator:
|
|
20580
|
+
/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
|
20581
|
+
boolean: /\b(?:false|true)\b/
|
|
20582
|
+
});
|
|
20583
|
+
Prism.languages.insertBefore('cpp', 'string', {
|
|
20584
|
+
module: {
|
|
20585
|
+
// https://en.cppreference.com/w/cpp/language/modules
|
|
20586
|
+
pattern: RegExp(
|
|
20587
|
+
/(\b(?:import|module)\s+)/.source +
|
|
20588
|
+
'(?:' + // header-name
|
|
20589
|
+
/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
|
|
20590
|
+
'|' + // module name or partition or both
|
|
20591
|
+
/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
|
|
20592
|
+
/<mod-name>/g,
|
|
20593
|
+
function () {
|
|
20594
|
+
return modName
|
|
20595
|
+
}
|
|
20596
|
+
) +
|
|
20597
|
+
')'
|
|
20598
|
+
),
|
|
20599
|
+
lookbehind: true,
|
|
20600
|
+
greedy: true,
|
|
20601
|
+
inside: {
|
|
20602
|
+
string: /^[<"][\s\S]+/,
|
|
20603
|
+
operator: /:/,
|
|
20604
|
+
punctuation: /\./
|
|
20605
|
+
}
|
|
20606
|
+
},
|
|
20607
|
+
'raw-string': {
|
|
20608
|
+
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
|
20609
|
+
alias: 'string',
|
|
20610
|
+
greedy: true
|
|
20611
|
+
}
|
|
20612
|
+
});
|
|
20613
|
+
Prism.languages.insertBefore('cpp', 'keyword', {
|
|
20614
|
+
'generic-function': {
|
|
20615
|
+
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
|
20616
|
+
inside: {
|
|
20617
|
+
function: /^\w+/,
|
|
20618
|
+
generic: {
|
|
20619
|
+
pattern: /<[\s\S]+/,
|
|
20620
|
+
alias: 'class-name',
|
|
20621
|
+
inside: Prism.languages.cpp
|
|
20622
|
+
}
|
|
20623
|
+
}
|
|
20624
|
+
}
|
|
20625
|
+
});
|
|
20626
|
+
Prism.languages.insertBefore('cpp', 'operator', {
|
|
20627
|
+
'double-colon': {
|
|
20628
|
+
pattern: /::/,
|
|
20629
|
+
alias: 'punctuation'
|
|
20630
|
+
}
|
|
20631
|
+
});
|
|
20632
|
+
Prism.languages.insertBefore('cpp', 'class-name', {
|
|
20633
|
+
// the base clause is an optional list of parent classes
|
|
20634
|
+
// https://en.cppreference.com/w/cpp/language/class
|
|
20635
|
+
'base-clause': {
|
|
20636
|
+
pattern:
|
|
20637
|
+
/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
|
20638
|
+
lookbehind: true,
|
|
20639
|
+
greedy: true,
|
|
20640
|
+
inside: Prism.languages.extend('cpp', {})
|
|
20641
|
+
}
|
|
20642
|
+
});
|
|
20643
|
+
Prism.languages.insertBefore(
|
|
20644
|
+
'inside',
|
|
20645
|
+
'double-colon',
|
|
20646
|
+
{
|
|
20647
|
+
// All untokenized words that are not namespaces should be class names
|
|
20648
|
+
'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
|
|
20649
|
+
},
|
|
20650
|
+
Prism.languages.cpp['base-clause']
|
|
20651
|
+
);
|
|
20652
|
+
})(Prism);
|
|
20653
|
+
}
|
|
20654
|
+
return cpp_1;
|
|
20647
20655
|
}
|
|
20648
20656
|
|
|
20649
|
-
var refractorCpp$1 =
|
|
20657
|
+
var refractorCpp$1 = requireCpp();
|
|
20650
20658
|
var arduino_1 = arduino;
|
|
20651
20659
|
arduino.displayName = 'arduino';
|
|
20652
20660
|
arduino.aliases = ['ino'];
|
|
@@ -20990,475 +20998,484 @@ function asmatmel(Prism) {
|
|
|
20990
20998
|
};
|
|
20991
20999
|
}
|
|
20992
21000
|
|
|
20993
|
-
var csharp_1
|
|
20994
|
-
|
|
20995
|
-
|
|
20996
|
-
function
|
|
21001
|
+
var csharp_1;
|
|
21002
|
+
var hasRequiredCsharp;
|
|
21003
|
+
|
|
21004
|
+
function requireCsharp () {
|
|
21005
|
+
if (hasRequiredCsharp) return csharp_1;
|
|
21006
|
+
hasRequiredCsharp = 1;
|
|
21007
|
+
|
|
21008
|
+
csharp_1 = csharp;
|
|
21009
|
+
csharp.displayName = 'csharp';
|
|
21010
|
+
csharp.aliases = ['dotnet', 'cs'];
|
|
21011
|
+
function csharp(Prism) {
|
|
20997
21012
|
(function (Prism) {
|
|
20998
|
-
|
|
20999
|
-
|
|
21000
|
-
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
|
|
21009
|
-
|
|
21010
|
-
|
|
21011
|
-
|
|
21012
|
-
|
|
21013
|
-
|
|
21014
|
-
|
|
21015
|
-
|
|
21016
|
-
|
|
21017
|
-
|
|
21018
|
-
|
|
21019
|
-
|
|
21020
|
-
|
|
21021
|
-
|
|
21022
|
-
|
|
21023
|
-
|
|
21024
|
-
|
|
21025
|
-
|
|
21026
|
-
|
|
21027
|
-
|
|
21028
|
-
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
|
|
21032
|
-
|
|
21033
|
-
|
|
21034
|
-
|
|
21035
|
-
|
|
21036
|
-
|
|
21037
|
-
|
|
21038
|
-
|
|
21039
|
-
|
|
21040
|
-
|
|
21041
|
-
|
|
21042
|
-
|
|
21043
|
-
|
|
21044
|
-
|
|
21045
|
-
|
|
21046
|
-
|
|
21047
|
-
|
|
21048
|
-
|
|
21049
|
-
|
|
21050
|
-
|
|
21051
|
-
|
|
21052
|
-
|
|
21053
|
-
|
|
21054
|
-
|
|
21055
|
-
|
|
21056
|
-
|
|
21057
|
-
|
|
21058
|
-
|
|
21059
|
-
|
|
21060
|
-
|
|
21061
|
-
|
|
21062
|
-
|
|
21063
|
-
|
|
21064
|
-
|
|
21065
|
-
|
|
21066
|
-
|
|
21067
|
-
|
|
21068
|
-
|
|
21069
|
-
|
|
21070
|
-
|
|
21071
|
-
|
|
21072
|
-
|
|
21073
|
-
|
|
21074
|
-
|
|
21075
|
-
|
|
21076
|
-
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
|
|
21080
|
-
|
|
21081
|
-
|
|
21082
|
-
|
|
21083
|
-
|
|
21084
|
-
|
|
21085
|
-
|
|
21086
|
-
|
|
21087
|
-
|
|
21088
|
-
|
|
21089
|
-
|
|
21090
|
-
|
|
21091
|
-
|
|
21092
|
-
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
|
|
21096
|
-
|
|
21097
|
-
|
|
21098
|
-
|
|
21099
|
-
|
|
21100
|
-
|
|
21101
|
-
|
|
21102
|
-
|
|
21103
|
-
|
|
21104
|
-
|
|
21105
|
-
|
|
21106
|
-
|
|
21107
|
-
|
|
21108
|
-
|
|
21109
|
-
|
|
21110
|
-
|
|
21111
|
-
|
|
21112
|
-
|
|
21113
|
-
|
|
21114
|
-
|
|
21115
|
-
|
|
21116
|
-
|
|
21117
|
-
|
|
21118
|
-
|
|
21119
|
-
|
|
21120
|
-
|
|
21121
|
-
|
|
21122
|
-
|
|
21123
|
-
|
|
21124
|
-
|
|
21125
|
-
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
|
|
21131
|
-
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21135
|
-
|
|
21136
|
-
|
|
21137
|
-
|
|
21138
|
-
|
|
21139
|
-
|
|
21140
|
-
|
|
21141
|
-
|
|
21142
|
-
|
|
21143
|
-
|
|
21144
|
-
|
|
21145
|
-
|
|
21146
|
-
|
|
21147
|
-
|
|
21148
|
-
|
|
21149
|
-
|
|
21150
|
-
|
|
21151
|
-
|
|
21152
|
-
|
|
21153
|
-
|
|
21154
|
-
|
|
21155
|
-
|
|
21156
|
-
|
|
21157
|
-
|
|
21158
|
-
|
|
21159
|
-
|
|
21160
|
-
|
|
21161
|
-
|
|
21162
|
-
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
|
|
21173
|
-
|
|
21174
|
-
|
|
21175
|
-
|
|
21176
|
-
|
|
21177
|
-
|
|
21178
|
-
|
|
21179
|
-
|
|
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
|
-
// int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
|
|
21261
|
-
pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
|
|
21262
|
-
inside: classNameInside,
|
|
21263
|
-
alias: 'class-name'
|
|
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
|
-
|
|
21013
|
+
/**
|
|
21014
|
+
* Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
|
|
21015
|
+
*
|
|
21016
|
+
* Note: This is a simple text based replacement. Be careful when using backreferences!
|
|
21017
|
+
*
|
|
21018
|
+
* @param {string} pattern the given pattern.
|
|
21019
|
+
* @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
|
|
21020
|
+
* @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
|
|
21021
|
+
* @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
|
|
21022
|
+
*/
|
|
21023
|
+
function replace(pattern, replacements) {
|
|
21024
|
+
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
|
21025
|
+
return '(?:' + replacements[+index] + ')'
|
|
21026
|
+
})
|
|
21027
|
+
}
|
|
21028
|
+
/**
|
|
21029
|
+
* @param {string} pattern
|
|
21030
|
+
* @param {string[]} replacements
|
|
21031
|
+
* @param {string} [flags]
|
|
21032
|
+
* @returns {RegExp}
|
|
21033
|
+
*/
|
|
21034
|
+
function re(pattern, replacements, flags) {
|
|
21035
|
+
return RegExp(replace(pattern, replacements), flags || '')
|
|
21036
|
+
}
|
|
21037
|
+
/**
|
|
21038
|
+
* Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
|
|
21039
|
+
*
|
|
21040
|
+
* @param {string} pattern
|
|
21041
|
+
* @param {number} depthLog2
|
|
21042
|
+
* @returns {string}
|
|
21043
|
+
*/
|
|
21044
|
+
function nested(pattern, depthLog2) {
|
|
21045
|
+
for (var i = 0; i < depthLog2; i++) {
|
|
21046
|
+
pattern = pattern.replace(/<<self>>/g, function () {
|
|
21047
|
+
return '(?:' + pattern + ')'
|
|
21048
|
+
});
|
|
21049
|
+
}
|
|
21050
|
+
return pattern.replace(/<<self>>/g, '[^\\s\\S]')
|
|
21051
|
+
} // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
|
|
21052
|
+
var keywordKinds = {
|
|
21053
|
+
// keywords which represent a return or variable type
|
|
21054
|
+
type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
|
|
21055
|
+
// keywords which are used to declare a type
|
|
21056
|
+
typeDeclaration: 'class enum interface record struct',
|
|
21057
|
+
// contextual keywords
|
|
21058
|
+
// ("var" and "dynamic" are missing because they are used like types)
|
|
21059
|
+
contextual:
|
|
21060
|
+
'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*{)',
|
|
21061
|
+
// all other keywords
|
|
21062
|
+
other:
|
|
21063
|
+
'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'
|
|
21064
|
+
}; // keywords
|
|
21065
|
+
function keywordsToPattern(words) {
|
|
21066
|
+
return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
|
|
21067
|
+
}
|
|
21068
|
+
var typeDeclarationKeywords = keywordsToPattern(
|
|
21069
|
+
keywordKinds.typeDeclaration
|
|
21070
|
+
);
|
|
21071
|
+
var keywords = RegExp(
|
|
21072
|
+
keywordsToPattern(
|
|
21073
|
+
keywordKinds.type +
|
|
21074
|
+
' ' +
|
|
21075
|
+
keywordKinds.typeDeclaration +
|
|
21076
|
+
' ' +
|
|
21077
|
+
keywordKinds.contextual +
|
|
21078
|
+
' ' +
|
|
21079
|
+
keywordKinds.other
|
|
21080
|
+
)
|
|
21081
|
+
);
|
|
21082
|
+
var nonTypeKeywords = keywordsToPattern(
|
|
21083
|
+
keywordKinds.typeDeclaration +
|
|
21084
|
+
' ' +
|
|
21085
|
+
keywordKinds.contextual +
|
|
21086
|
+
' ' +
|
|
21087
|
+
keywordKinds.other
|
|
21088
|
+
);
|
|
21089
|
+
var nonContextualKeywords = keywordsToPattern(
|
|
21090
|
+
keywordKinds.type +
|
|
21091
|
+
' ' +
|
|
21092
|
+
keywordKinds.typeDeclaration +
|
|
21093
|
+
' ' +
|
|
21094
|
+
keywordKinds.other
|
|
21095
|
+
); // types
|
|
21096
|
+
var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
|
|
21097
|
+
var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
|
|
21098
|
+
var name = /@?\b[A-Za-z_]\w*\b/.source;
|
|
21099
|
+
var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
|
|
21100
|
+
var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
|
|
21101
|
+
nonTypeKeywords,
|
|
21102
|
+
genericName
|
|
21103
|
+
]);
|
|
21104
|
+
var array = /\[\s*(?:,\s*)*\]/.source;
|
|
21105
|
+
var typeExpressionWithoutTuple = replace(
|
|
21106
|
+
/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
|
|
21107
|
+
[identifier, array]
|
|
21108
|
+
);
|
|
21109
|
+
var tupleElement = replace(
|
|
21110
|
+
/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
|
|
21111
|
+
[generic, nestedRound, array]
|
|
21112
|
+
);
|
|
21113
|
+
var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
|
|
21114
|
+
var typeExpression = replace(
|
|
21115
|
+
/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
|
|
21116
|
+
[tuple, identifier, array]
|
|
21117
|
+
);
|
|
21118
|
+
var typeInside = {
|
|
21119
|
+
keyword: keywords,
|
|
21120
|
+
punctuation: /[<>()?,.:[\]]/
|
|
21121
|
+
}; // strings & characters
|
|
21122
|
+
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
|
|
21123
|
+
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
|
|
21124
|
+
var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
|
|
21125
|
+
var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
|
|
21126
|
+
var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
|
|
21127
|
+
Prism.languages.csharp = Prism.languages.extend('clike', {
|
|
21128
|
+
string: [
|
|
21129
|
+
{
|
|
21130
|
+
pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
|
|
21131
|
+
lookbehind: true,
|
|
21132
|
+
greedy: true
|
|
21133
|
+
},
|
|
21134
|
+
{
|
|
21135
|
+
pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
|
|
21136
|
+
lookbehind: true,
|
|
21137
|
+
greedy: true
|
|
21138
|
+
}
|
|
21139
|
+
],
|
|
21140
|
+
'class-name': [
|
|
21141
|
+
{
|
|
21142
|
+
// Using static
|
|
21143
|
+
// using static System.Math;
|
|
21144
|
+
pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
|
|
21145
|
+
identifier
|
|
21146
|
+
]),
|
|
21147
|
+
lookbehind: true,
|
|
21148
|
+
inside: typeInside
|
|
21149
|
+
},
|
|
21150
|
+
{
|
|
21151
|
+
// Using alias (type)
|
|
21152
|
+
// using Project = PC.MyCompany.Project;
|
|
21153
|
+
pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
|
|
21154
|
+
name,
|
|
21155
|
+
typeExpression
|
|
21156
|
+
]),
|
|
21157
|
+
lookbehind: true,
|
|
21158
|
+
inside: typeInside
|
|
21159
|
+
},
|
|
21160
|
+
{
|
|
21161
|
+
// Using alias (alias)
|
|
21162
|
+
// using Project = PC.MyCompany.Project;
|
|
21163
|
+
pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
|
|
21164
|
+
lookbehind: true
|
|
21165
|
+
},
|
|
21166
|
+
{
|
|
21167
|
+
// Type declarations
|
|
21168
|
+
// class Foo<A, B>
|
|
21169
|
+
// interface Foo<out A, B>
|
|
21170
|
+
pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
|
|
21171
|
+
typeDeclarationKeywords,
|
|
21172
|
+
genericName
|
|
21173
|
+
]),
|
|
21174
|
+
lookbehind: true,
|
|
21175
|
+
inside: typeInside
|
|
21176
|
+
},
|
|
21177
|
+
{
|
|
21178
|
+
// Single catch exception declaration
|
|
21179
|
+
// catch(Foo)
|
|
21180
|
+
// (things like catch(Foo e) is covered by variable declaration)
|
|
21181
|
+
pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
|
|
21182
|
+
lookbehind: true,
|
|
21183
|
+
inside: typeInside
|
|
21184
|
+
},
|
|
21185
|
+
{
|
|
21186
|
+
// Name of the type parameter of generic constraints
|
|
21187
|
+
// where Foo : class
|
|
21188
|
+
pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
|
|
21189
|
+
lookbehind: true
|
|
21190
|
+
},
|
|
21191
|
+
{
|
|
21192
|
+
// Casts and checks via as and is.
|
|
21193
|
+
// as Foo<A>, is Bar<B>
|
|
21194
|
+
// (things like if(a is Foo b) is covered by variable declaration)
|
|
21195
|
+
pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
|
|
21196
|
+
typeExpressionWithoutTuple
|
|
21197
|
+
]),
|
|
21198
|
+
lookbehind: true,
|
|
21199
|
+
inside: typeInside
|
|
21200
|
+
},
|
|
21201
|
+
{
|
|
21202
|
+
// Variable, field and parameter declaration
|
|
21203
|
+
// (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
|
|
21204
|
+
pattern: re(
|
|
21205
|
+
/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
|
|
21206
|
+
.source,
|
|
21207
|
+
[typeExpression, nonContextualKeywords, name]
|
|
21208
|
+
),
|
|
21209
|
+
inside: typeInside
|
|
21210
|
+
}
|
|
21211
|
+
],
|
|
21212
|
+
keyword: keywords,
|
|
21213
|
+
// https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
|
|
21214
|
+
number:
|
|
21215
|
+
/(?:\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,
|
|
21216
|
+
operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
|
|
21217
|
+
punctuation: /\?\.?|::|[{}[\];(),.:]/
|
|
21218
|
+
});
|
|
21219
|
+
Prism.languages.insertBefore('csharp', 'number', {
|
|
21220
|
+
range: {
|
|
21221
|
+
pattern: /\.\./,
|
|
21222
|
+
alias: 'operator'
|
|
21223
|
+
}
|
|
21224
|
+
});
|
|
21225
|
+
Prism.languages.insertBefore('csharp', 'punctuation', {
|
|
21226
|
+
'named-parameter': {
|
|
21227
|
+
pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
|
|
21228
|
+
lookbehind: true,
|
|
21229
|
+
alias: 'punctuation'
|
|
21230
|
+
}
|
|
21231
|
+
});
|
|
21232
|
+
Prism.languages.insertBefore('csharp', 'class-name', {
|
|
21233
|
+
namespace: {
|
|
21234
|
+
// namespace Foo.Bar {}
|
|
21235
|
+
// using Foo.Bar;
|
|
21236
|
+
pattern: re(
|
|
21237
|
+
/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
|
|
21238
|
+
[name]
|
|
21239
|
+
),
|
|
21240
|
+
lookbehind: true,
|
|
21241
|
+
inside: {
|
|
21242
|
+
punctuation: /\./
|
|
21243
|
+
}
|
|
21244
|
+
},
|
|
21245
|
+
'type-expression': {
|
|
21246
|
+
// default(Foo), typeof(Foo<Bar>), sizeof(int)
|
|
21247
|
+
pattern: re(
|
|
21248
|
+
/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
|
|
21249
|
+
.source,
|
|
21250
|
+
[nestedRound]
|
|
21251
|
+
),
|
|
21252
|
+
lookbehind: true,
|
|
21253
|
+
alias: 'class-name',
|
|
21254
|
+
inside: typeInside
|
|
21255
|
+
},
|
|
21256
|
+
'return-type': {
|
|
21257
|
+
// Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
|
|
21258
|
+
// int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
|
|
21259
|
+
// int Foo => 0; int Foo { get; set } = 0;
|
|
21260
|
+
pattern: re(
|
|
21261
|
+
/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
|
|
21262
|
+
[typeExpression, identifier]
|
|
21263
|
+
),
|
|
21264
|
+
inside: typeInside,
|
|
21265
|
+
alias: 'class-name'
|
|
21266
|
+
},
|
|
21267
|
+
'constructor-invocation': {
|
|
21268
|
+
// new List<Foo<Bar[]>> { }
|
|
21269
|
+
pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
|
|
21270
|
+
lookbehind: true,
|
|
21271
|
+
inside: typeInside,
|
|
21272
|
+
alias: 'class-name'
|
|
21273
|
+
},
|
|
21274
|
+
/*'explicit-implementation': {
|
|
21275
|
+
// int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
|
|
21276
|
+
pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
|
|
21277
|
+
inside: classNameInside,
|
|
21278
|
+
alias: 'class-name'
|
|
21279
|
+
},*/
|
|
21280
|
+
'generic-method': {
|
|
21281
|
+
// foo<Bar>()
|
|
21282
|
+
pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
|
|
21283
|
+
inside: {
|
|
21284
|
+
function: re(/^<<0>>/.source, [name]),
|
|
21285
|
+
generic: {
|
|
21286
|
+
pattern: RegExp(generic),
|
|
21287
|
+
alias: 'class-name',
|
|
21288
|
+
inside: typeInside
|
|
21289
|
+
}
|
|
21290
|
+
}
|
|
21291
|
+
},
|
|
21292
|
+
'type-list': {
|
|
21293
|
+
// The list of types inherited or of generic constraints
|
|
21294
|
+
// class Foo<F> : Bar, IList<FooBar>
|
|
21295
|
+
// where F : Bar, IList<int>
|
|
21296
|
+
pattern: re(
|
|
21297
|
+
/\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|[{;]|=>|$))/
|
|
21298
|
+
.source,
|
|
21299
|
+
[
|
|
21300
|
+
typeDeclarationKeywords,
|
|
21301
|
+
genericName,
|
|
21302
|
+
name,
|
|
21303
|
+
typeExpression,
|
|
21304
|
+
keywords.source,
|
|
21305
|
+
nestedRound,
|
|
21306
|
+
/\bnew\s*\(\s*\)/.source
|
|
21307
|
+
]
|
|
21308
|
+
),
|
|
21309
|
+
lookbehind: true,
|
|
21310
|
+
inside: {
|
|
21311
|
+
'record-arguments': {
|
|
21312
|
+
pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
|
|
21313
|
+
genericName,
|
|
21314
|
+
nestedRound
|
|
21315
|
+
]),
|
|
21316
|
+
lookbehind: true,
|
|
21317
|
+
greedy: true,
|
|
21318
|
+
inside: Prism.languages.csharp
|
|
21319
|
+
},
|
|
21320
|
+
keyword: keywords,
|
|
21321
|
+
'class-name': {
|
|
21322
|
+
pattern: RegExp(typeExpression),
|
|
21323
|
+
greedy: true,
|
|
21324
|
+
inside: typeInside
|
|
21325
|
+
},
|
|
21326
|
+
punctuation: /[,()]/
|
|
21327
|
+
}
|
|
21328
|
+
},
|
|
21329
|
+
preprocessor: {
|
|
21330
|
+
pattern: /(^[\t ]*)#.*/m,
|
|
21331
|
+
lookbehind: true,
|
|
21332
|
+
alias: 'property',
|
|
21333
|
+
inside: {
|
|
21334
|
+
// highlight preprocessor directives as keywords
|
|
21335
|
+
directive: {
|
|
21336
|
+
pattern:
|
|
21337
|
+
/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
|
|
21338
|
+
lookbehind: true,
|
|
21339
|
+
alias: 'keyword'
|
|
21340
|
+
}
|
|
21341
|
+
}
|
|
21342
|
+
}
|
|
21343
|
+
}); // attributes
|
|
21344
|
+
var regularStringOrCharacter = regularString + '|' + character;
|
|
21345
|
+
var regularStringCharacterOrComment = replace(
|
|
21346
|
+
/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
|
|
21347
|
+
[regularStringOrCharacter]
|
|
21348
|
+
);
|
|
21349
|
+
var roundExpression = nested(
|
|
21350
|
+
replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
|
|
21351
|
+
regularStringCharacterOrComment
|
|
21352
|
+
]),
|
|
21353
|
+
2
|
|
21354
|
+
); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
|
|
21355
|
+
var attrTarget =
|
|
21356
|
+
/\b(?:assembly|event|field|method|module|param|property|return|type)\b/
|
|
21357
|
+
.source;
|
|
21358
|
+
var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
|
|
21359
|
+
identifier,
|
|
21360
|
+
roundExpression
|
|
21361
|
+
]);
|
|
21362
|
+
Prism.languages.insertBefore('csharp', 'class-name', {
|
|
21363
|
+
attribute: {
|
|
21364
|
+
// Attributes
|
|
21365
|
+
// [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
|
|
21366
|
+
pattern: re(
|
|
21367
|
+
/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
|
|
21368
|
+
.source,
|
|
21369
|
+
[attrTarget, attr]
|
|
21370
|
+
),
|
|
21371
|
+
lookbehind: true,
|
|
21372
|
+
greedy: true,
|
|
21373
|
+
inside: {
|
|
21374
|
+
target: {
|
|
21375
|
+
pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
|
|
21376
|
+
alias: 'keyword'
|
|
21377
|
+
},
|
|
21378
|
+
'attribute-arguments': {
|
|
21379
|
+
pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
|
|
21380
|
+
inside: Prism.languages.csharp
|
|
21381
|
+
},
|
|
21382
|
+
'class-name': {
|
|
21383
|
+
pattern: RegExp(identifier),
|
|
21384
|
+
inside: {
|
|
21385
|
+
punctuation: /\./
|
|
21386
|
+
}
|
|
21387
|
+
},
|
|
21388
|
+
punctuation: /[:,]/
|
|
21389
|
+
}
|
|
21390
|
+
}
|
|
21391
|
+
}); // string interpolation
|
|
21392
|
+
var formatString = /:[^}\r\n]+/.source; // multi line
|
|
21393
|
+
var mInterpolationRound = nested(
|
|
21394
|
+
replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
|
|
21395
|
+
regularStringCharacterOrComment
|
|
21396
|
+
]),
|
|
21397
|
+
2
|
|
21398
|
+
);
|
|
21399
|
+
var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
|
|
21400
|
+
mInterpolationRound,
|
|
21401
|
+
formatString
|
|
21402
|
+
]); // single line
|
|
21403
|
+
var sInterpolationRound = nested(
|
|
21404
|
+
replace(
|
|
21405
|
+
/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
|
|
21406
|
+
.source,
|
|
21407
|
+
[regularStringOrCharacter]
|
|
21408
|
+
),
|
|
21409
|
+
2
|
|
21410
|
+
);
|
|
21411
|
+
var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
|
|
21412
|
+
sInterpolationRound,
|
|
21413
|
+
formatString
|
|
21414
|
+
]);
|
|
21415
|
+
function createInterpolationInside(interpolation, interpolationRound) {
|
|
21416
|
+
return {
|
|
21417
|
+
interpolation: {
|
|
21418
|
+
pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
|
|
21419
|
+
lookbehind: true,
|
|
21420
|
+
inside: {
|
|
21421
|
+
'format-string': {
|
|
21422
|
+
pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
|
|
21423
|
+
interpolationRound,
|
|
21424
|
+
formatString
|
|
21425
|
+
]),
|
|
21426
|
+
lookbehind: true,
|
|
21427
|
+
inside: {
|
|
21428
|
+
punctuation: /^:/
|
|
21429
|
+
}
|
|
21430
|
+
},
|
|
21431
|
+
punctuation: /^\{|\}$/,
|
|
21432
|
+
expression: {
|
|
21433
|
+
pattern: /[\s\S]+/,
|
|
21434
|
+
alias: 'language-csharp',
|
|
21435
|
+
inside: Prism.languages.csharp
|
|
21436
|
+
}
|
|
21437
|
+
}
|
|
21438
|
+
},
|
|
21439
|
+
string: /[\s\S]+/
|
|
21440
|
+
}
|
|
21441
|
+
}
|
|
21442
|
+
Prism.languages.insertBefore('csharp', 'string', {
|
|
21443
|
+
'interpolation-string': [
|
|
21444
|
+
{
|
|
21445
|
+
pattern: re(
|
|
21446
|
+
/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
|
|
21447
|
+
[mInterpolation]
|
|
21448
|
+
),
|
|
21449
|
+
lookbehind: true,
|
|
21450
|
+
greedy: true,
|
|
21451
|
+
inside: createInterpolationInside(mInterpolation, mInterpolationRound)
|
|
21452
|
+
},
|
|
21453
|
+
{
|
|
21454
|
+
pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
|
|
21455
|
+
sInterpolation
|
|
21456
|
+
]),
|
|
21457
|
+
lookbehind: true,
|
|
21458
|
+
greedy: true,
|
|
21459
|
+
inside: createInterpolationInside(sInterpolation, sInterpolationRound)
|
|
21460
|
+
}
|
|
21461
|
+
],
|
|
21462
|
+
char: {
|
|
21463
|
+
pattern: RegExp(character),
|
|
21464
|
+
greedy: true
|
|
21465
|
+
}
|
|
21466
|
+
});
|
|
21467
|
+
Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
|
|
21468
|
+
})(Prism);
|
|
21469
|
+
}
|
|
21470
|
+
return csharp_1;
|
|
21454
21471
|
}
|
|
21455
21472
|
|
|
21456
|
-
var refractorCsharp
|
|
21473
|
+
var refractorCsharp = requireCsharp();
|
|
21457
21474
|
var aspnet_1 = aspnet;
|
|
21458
21475
|
aspnet.displayName = 'aspnet';
|
|
21459
21476
|
aspnet.aliases = [];
|
|
21460
21477
|
function aspnet(Prism) {
|
|
21461
|
-
Prism.register(refractorCsharp
|
|
21478
|
+
Prism.register(refractorCsharp);
|
|
21462
21479
|
Prism.languages.aspnet = Prism.languages.extend('markup', {
|
|
21463
21480
|
'page-directive': {
|
|
21464
21481
|
pattern: /<%\s*@.*%>/,
|
|
@@ -22595,59 +22612,68 @@ function bsl(Prism) {
|
|
|
22595
22612
|
Prism.languages.oscript = Prism.languages['bsl'];
|
|
22596
22613
|
}
|
|
22597
22614
|
|
|
22598
|
-
var cfscript_1
|
|
22599
|
-
|
|
22600
|
-
|
|
22601
|
-
function
|
|
22602
|
-
|
|
22603
|
-
|
|
22604
|
-
|
|
22605
|
-
|
|
22606
|
-
|
|
22607
|
-
|
|
22608
|
-
|
|
22609
|
-
|
|
22610
|
-
|
|
22611
|
-
|
|
22612
|
-
|
|
22613
|
-
|
|
22614
|
-
|
|
22615
|
-
|
|
22616
|
-
|
|
22617
|
-
|
|
22618
|
-
|
|
22619
|
-
|
|
22620
|
-
|
|
22621
|
-
|
|
22622
|
-
|
|
22623
|
-
|
|
22624
|
-
|
|
22625
|
-
|
|
22626
|
-
|
|
22627
|
-
|
|
22628
|
-
|
|
22629
|
-
|
|
22630
|
-
|
|
22631
|
-
|
|
22632
|
-
|
|
22633
|
-
|
|
22634
|
-
|
|
22635
|
-
|
|
22636
|
-
|
|
22637
|
-
|
|
22638
|
-
|
|
22639
|
-
|
|
22640
|
-
|
|
22641
|
-
|
|
22642
|
-
|
|
22643
|
-
|
|
22644
|
-
|
|
22645
|
-
|
|
22646
|
-
|
|
22647
|
-
|
|
22615
|
+
var cfscript_1;
|
|
22616
|
+
var hasRequiredCfscript;
|
|
22617
|
+
|
|
22618
|
+
function requireCfscript () {
|
|
22619
|
+
if (hasRequiredCfscript) return cfscript_1;
|
|
22620
|
+
hasRequiredCfscript = 1;
|
|
22621
|
+
|
|
22622
|
+
cfscript_1 = cfscript;
|
|
22623
|
+
cfscript.displayName = 'cfscript';
|
|
22624
|
+
cfscript.aliases = [];
|
|
22625
|
+
function cfscript(Prism) {
|
|
22626
|
+
// https://cfdocs.org/script
|
|
22627
|
+
Prism.languages.cfscript = Prism.languages.extend('clike', {
|
|
22628
|
+
comment: [
|
|
22629
|
+
{
|
|
22630
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
22631
|
+
lookbehind: true,
|
|
22632
|
+
inside: {
|
|
22633
|
+
annotation: {
|
|
22634
|
+
pattern: /(?:^|[^.])@[\w\.]+/,
|
|
22635
|
+
alias: 'punctuation'
|
|
22636
|
+
}
|
|
22637
|
+
}
|
|
22638
|
+
},
|
|
22639
|
+
{
|
|
22640
|
+
pattern: /(^|[^\\:])\/\/.*/,
|
|
22641
|
+
lookbehind: true,
|
|
22642
|
+
greedy: true
|
|
22643
|
+
}
|
|
22644
|
+
],
|
|
22645
|
+
keyword:
|
|
22646
|
+
/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,
|
|
22647
|
+
operator: [
|
|
22648
|
+
/\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/,
|
|
22649
|
+
/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/
|
|
22650
|
+
],
|
|
22651
|
+
scope: {
|
|
22652
|
+
pattern:
|
|
22653
|
+
/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,
|
|
22654
|
+
alias: 'global'
|
|
22655
|
+
},
|
|
22656
|
+
type: {
|
|
22657
|
+
pattern:
|
|
22658
|
+
/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,
|
|
22659
|
+
alias: 'builtin'
|
|
22660
|
+
}
|
|
22661
|
+
});
|
|
22662
|
+
Prism.languages.insertBefore('cfscript', 'keyword', {
|
|
22663
|
+
// This must be declared before keyword because we use "function" inside the lookahead
|
|
22664
|
+
'function-variable': {
|
|
22665
|
+
pattern:
|
|
22666
|
+
/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,
|
|
22667
|
+
alias: 'function'
|
|
22668
|
+
}
|
|
22669
|
+
});
|
|
22670
|
+
delete Prism.languages.cfscript['class-name'];
|
|
22671
|
+
Prism.languages.cfc = Prism.languages['cfscript'];
|
|
22672
|
+
}
|
|
22673
|
+
return cfscript_1;
|
|
22648
22674
|
}
|
|
22649
22675
|
|
|
22650
|
-
var refractorCpp =
|
|
22676
|
+
var refractorCpp = requireCpp();
|
|
22651
22677
|
var chaiscript_1 = chaiscript;
|
|
22652
22678
|
chaiscript.displayName = 'chaiscript';
|
|
22653
22679
|
chaiscript.aliases = [];
|
|
@@ -22878,772 +22904,833 @@ function cobol(Prism) {
|
|
|
22878
22904
|
};
|
|
22879
22905
|
}
|
|
22880
22906
|
|
|
22881
|
-
var coffeescript_1
|
|
22882
|
-
|
|
22883
|
-
|
|
22884
|
-
function
|
|
22907
|
+
var coffeescript_1;
|
|
22908
|
+
var hasRequiredCoffeescript;
|
|
22909
|
+
|
|
22910
|
+
function requireCoffeescript () {
|
|
22911
|
+
if (hasRequiredCoffeescript) return coffeescript_1;
|
|
22912
|
+
hasRequiredCoffeescript = 1;
|
|
22913
|
+
|
|
22914
|
+
coffeescript_1 = coffeescript;
|
|
22915
|
+
coffeescript.displayName = 'coffeescript';
|
|
22916
|
+
coffeescript.aliases = ['coffee'];
|
|
22917
|
+
function coffeescript(Prism) {
|
|
22885
22918
|
(function (Prism) {
|
|
22886
|
-
|
|
22887
|
-
|
|
22888
|
-
|
|
22889
|
-
|
|
22890
|
-
|
|
22891
|
-
|
|
22892
|
-
|
|
22893
|
-
|
|
22894
|
-
|
|
22895
|
-
|
|
22896
|
-
|
|
22897
|
-
|
|
22898
|
-
|
|
22899
|
-
|
|
22900
|
-
|
|
22901
|
-
|
|
22902
|
-
|
|
22903
|
-
|
|
22904
|
-
|
|
22905
|
-
|
|
22906
|
-
|
|
22907
|
-
|
|
22908
|
-
|
|
22909
|
-
|
|
22910
|
-
|
|
22911
|
-
|
|
22912
|
-
|
|
22913
|
-
|
|
22914
|
-
|
|
22915
|
-
|
|
22916
|
-
|
|
22917
|
-
|
|
22918
|
-
|
|
22919
|
-
|
|
22920
|
-
|
|
22921
|
-
|
|
22922
|
-
|
|
22923
|
-
|
|
22924
|
-
|
|
22925
|
-
|
|
22926
|
-
|
|
22927
|
-
|
|
22928
|
-
|
|
22929
|
-
|
|
22930
|
-
|
|
22931
|
-
|
|
22932
|
-
|
|
22933
|
-
|
|
22934
|
-
|
|
22935
|
-
|
|
22936
|
-
|
|
22937
|
-
|
|
22938
|
-
|
|
22939
|
-
|
|
22940
|
-
|
|
22941
|
-
|
|
22942
|
-
|
|
22943
|
-
|
|
22944
|
-
|
|
22945
|
-
|
|
22946
|
-
|
|
22947
|
-
|
|
22948
|
-
|
|
22949
|
-
|
|
22950
|
-
|
|
22951
|
-
|
|
22952
|
-
|
|
22953
|
-
|
|
22954
|
-
|
|
22955
|
-
|
|
22956
|
-
|
|
22957
|
-
|
|
22958
|
-
|
|
22959
|
-
|
|
22960
|
-
|
|
22961
|
-
|
|
22962
|
-
|
|
22963
|
-
|
|
22964
|
-
|
|
22965
|
-
|
|
22966
|
-
|
|
22967
|
-
|
|
22968
|
-
|
|
22969
|
-
|
|
22919
|
+
// Ignore comments starting with { to privilege string interpolation highlighting
|
|
22920
|
+
var comment = /#(?!\{).+/;
|
|
22921
|
+
var interpolation = {
|
|
22922
|
+
pattern: /#\{[^}]+\}/,
|
|
22923
|
+
alias: 'variable'
|
|
22924
|
+
};
|
|
22925
|
+
Prism.languages.coffeescript = Prism.languages.extend('javascript', {
|
|
22926
|
+
comment: comment,
|
|
22927
|
+
string: [
|
|
22928
|
+
// Strings are multiline
|
|
22929
|
+
{
|
|
22930
|
+
pattern: /'(?:\\[\s\S]|[^\\'])*'/,
|
|
22931
|
+
greedy: true
|
|
22932
|
+
},
|
|
22933
|
+
{
|
|
22934
|
+
// Strings are multiline
|
|
22935
|
+
pattern: /"(?:\\[\s\S]|[^\\"])*"/,
|
|
22936
|
+
greedy: true,
|
|
22937
|
+
inside: {
|
|
22938
|
+
interpolation: interpolation
|
|
22939
|
+
}
|
|
22940
|
+
}
|
|
22941
|
+
],
|
|
22942
|
+
keyword:
|
|
22943
|
+
/\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/,
|
|
22944
|
+
'class-member': {
|
|
22945
|
+
pattern: /@(?!\d)\w+/,
|
|
22946
|
+
alias: 'variable'
|
|
22947
|
+
}
|
|
22948
|
+
});
|
|
22949
|
+
Prism.languages.insertBefore('coffeescript', 'comment', {
|
|
22950
|
+
'multiline-comment': {
|
|
22951
|
+
pattern: /###[\s\S]+?###/,
|
|
22952
|
+
alias: 'comment'
|
|
22953
|
+
},
|
|
22954
|
+
// Block regexp can contain comments and interpolation
|
|
22955
|
+
'block-regex': {
|
|
22956
|
+
pattern: /\/{3}[\s\S]*?\/{3}/,
|
|
22957
|
+
alias: 'regex',
|
|
22958
|
+
inside: {
|
|
22959
|
+
comment: comment,
|
|
22960
|
+
interpolation: interpolation
|
|
22961
|
+
}
|
|
22962
|
+
}
|
|
22963
|
+
});
|
|
22964
|
+
Prism.languages.insertBefore('coffeescript', 'string', {
|
|
22965
|
+
'inline-javascript': {
|
|
22966
|
+
pattern: /`(?:\\[\s\S]|[^\\`])*`/,
|
|
22967
|
+
inside: {
|
|
22968
|
+
delimiter: {
|
|
22969
|
+
pattern: /^`|`$/,
|
|
22970
|
+
alias: 'punctuation'
|
|
22971
|
+
},
|
|
22972
|
+
script: {
|
|
22973
|
+
pattern: /[\s\S]+/,
|
|
22974
|
+
alias: 'language-javascript',
|
|
22975
|
+
inside: Prism.languages.javascript
|
|
22976
|
+
}
|
|
22977
|
+
}
|
|
22978
|
+
},
|
|
22979
|
+
// Block strings
|
|
22980
|
+
'multiline-string': [
|
|
22981
|
+
{
|
|
22982
|
+
pattern: /'''[\s\S]*?'''/,
|
|
22983
|
+
greedy: true,
|
|
22984
|
+
alias: 'string'
|
|
22985
|
+
},
|
|
22986
|
+
{
|
|
22987
|
+
pattern: /"""[\s\S]*?"""/,
|
|
22988
|
+
greedy: true,
|
|
22989
|
+
alias: 'string',
|
|
22990
|
+
inside: {
|
|
22991
|
+
interpolation: interpolation
|
|
22992
|
+
}
|
|
22993
|
+
}
|
|
22994
|
+
]
|
|
22995
|
+
});
|
|
22996
|
+
Prism.languages.insertBefore('coffeescript', 'keyword', {
|
|
22997
|
+
// Object property
|
|
22998
|
+
property: /(?!\d)\w+(?=\s*:(?!:))/
|
|
22999
|
+
});
|
|
23000
|
+
delete Prism.languages.coffeescript['template-string'];
|
|
23001
|
+
Prism.languages.coffee = Prism.languages.coffeescript;
|
|
23002
|
+
})(Prism);
|
|
23003
|
+
}
|
|
23004
|
+
return coffeescript_1;
|
|
22970
23005
|
}
|
|
22971
23006
|
|
|
22972
|
-
var concurnas_1
|
|
22973
|
-
|
|
22974
|
-
|
|
22975
|
-
function
|
|
22976
|
-
|
|
22977
|
-
|
|
22978
|
-
|
|
22979
|
-
|
|
22980
|
-
|
|
22981
|
-
|
|
22982
|
-
|
|
22983
|
-
|
|
22984
|
-
|
|
22985
|
-
|
|
22986
|
-
|
|
22987
|
-
|
|
22988
|
-
|
|
22989
|
-
|
|
22990
|
-
|
|
22991
|
-
|
|
22992
|
-
|
|
22993
|
-
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
|
|
22997
|
-
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
|
|
23001
|
-
|
|
23002
|
-
|
|
23003
|
-
|
|
23004
|
-
|
|
23005
|
-
|
|
23006
|
-
|
|
23007
|
-
|
|
23008
|
-
|
|
23009
|
-
|
|
23010
|
-
|
|
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
|
-
|
|
23007
|
+
var concurnas_1;
|
|
23008
|
+
var hasRequiredConcurnas;
|
|
23009
|
+
|
|
23010
|
+
function requireConcurnas () {
|
|
23011
|
+
if (hasRequiredConcurnas) return concurnas_1;
|
|
23012
|
+
hasRequiredConcurnas = 1;
|
|
23013
|
+
|
|
23014
|
+
concurnas_1 = concurnas;
|
|
23015
|
+
concurnas.displayName = 'concurnas';
|
|
23016
|
+
concurnas.aliases = ['conc'];
|
|
23017
|
+
function concurnas(Prism) {
|
|
23018
|
+
Prism.languages.concurnas = {
|
|
23019
|
+
comment: {
|
|
23020
|
+
pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
|
|
23021
|
+
lookbehind: true,
|
|
23022
|
+
greedy: true
|
|
23023
|
+
},
|
|
23024
|
+
langext: {
|
|
23025
|
+
pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
|
|
23026
|
+
greedy: true,
|
|
23027
|
+
inside: {
|
|
23028
|
+
'class-name': /^\w+/,
|
|
23029
|
+
string: {
|
|
23030
|
+
pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
|
|
23031
|
+
lookbehind: true
|
|
23032
|
+
},
|
|
23033
|
+
punctuation: /\|\|/
|
|
23034
|
+
}
|
|
23035
|
+
},
|
|
23036
|
+
function: {
|
|
23037
|
+
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
|
|
23038
|
+
lookbehind: true
|
|
23039
|
+
},
|
|
23040
|
+
keyword:
|
|
23041
|
+
/\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/,
|
|
23042
|
+
boolean: /\b(?:false|true)\b/,
|
|
23043
|
+
number:
|
|
23044
|
+
/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
|
|
23045
|
+
punctuation: /[{}[\];(),.:]/,
|
|
23046
|
+
operator:
|
|
23047
|
+
/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
|
|
23048
|
+
annotation: {
|
|
23049
|
+
pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
|
|
23050
|
+
alias: 'builtin'
|
|
23051
|
+
}
|
|
23052
|
+
};
|
|
23053
|
+
Prism.languages.insertBefore('concurnas', 'langext', {
|
|
23054
|
+
'regex-literal': {
|
|
23055
|
+
pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
23056
|
+
greedy: true,
|
|
23057
|
+
inside: {
|
|
23058
|
+
interpolation: {
|
|
23059
|
+
pattern:
|
|
23060
|
+
/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
23061
|
+
lookbehind: true,
|
|
23062
|
+
inside: Prism.languages.concurnas
|
|
23063
|
+
},
|
|
23064
|
+
regex: /[\s\S]+/
|
|
23065
|
+
}
|
|
23066
|
+
},
|
|
23067
|
+
'string-literal': {
|
|
23068
|
+
pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
|
|
23069
|
+
greedy: true,
|
|
23070
|
+
inside: {
|
|
23071
|
+
interpolation: {
|
|
23072
|
+
pattern:
|
|
23073
|
+
/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
|
|
23074
|
+
lookbehind: true,
|
|
23075
|
+
inside: Prism.languages.concurnas
|
|
23076
|
+
},
|
|
23077
|
+
string: /[\s\S]+/
|
|
23078
|
+
}
|
|
23079
|
+
}
|
|
23080
|
+
});
|
|
23081
|
+
Prism.languages.conc = Prism.languages.concurnas;
|
|
23082
|
+
}
|
|
23083
|
+
return concurnas_1;
|
|
23040
23084
|
}
|
|
23041
23085
|
|
|
23042
|
-
var coq_1
|
|
23043
|
-
|
|
23044
|
-
|
|
23045
|
-
function
|
|
23086
|
+
var coq_1;
|
|
23087
|
+
var hasRequiredCoq;
|
|
23088
|
+
|
|
23089
|
+
function requireCoq () {
|
|
23090
|
+
if (hasRequiredCoq) return coq_1;
|
|
23091
|
+
hasRequiredCoq = 1;
|
|
23092
|
+
|
|
23093
|
+
coq_1 = coq;
|
|
23094
|
+
coq.displayName = 'coq';
|
|
23095
|
+
coq.aliases = [];
|
|
23096
|
+
function coq(Prism) {
|
|
23046
23097
|
(function (Prism) {
|
|
23047
|
-
|
|
23048
|
-
|
|
23049
|
-
|
|
23050
|
-
|
|
23051
|
-
|
|
23052
|
-
|
|
23053
|
-
|
|
23054
|
-
|
|
23055
|
-
|
|
23056
|
-
|
|
23057
|
-
|
|
23058
|
-
|
|
23059
|
-
|
|
23060
|
-
|
|
23061
|
-
|
|
23062
|
-
|
|
23063
|
-
|
|
23064
|
-
|
|
23065
|
-
|
|
23066
|
-
|
|
23067
|
-
|
|
23068
|
-
|
|
23069
|
-
|
|
23070
|
-
|
|
23071
|
-
|
|
23072
|
-
|
|
23073
|
-
|
|
23074
|
-
|
|
23075
|
-
|
|
23076
|
-
|
|
23077
|
-
|
|
23078
|
-
|
|
23079
|
-
|
|
23080
|
-
|
|
23081
|
-
|
|
23082
|
-
|
|
23083
|
-
|
|
23084
|
-
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
|
|
23090
|
-
|
|
23091
|
-
|
|
23092
|
-
|
|
23093
|
-
|
|
23094
|
-
|
|
23095
|
-
|
|
23096
|
-
|
|
23097
|
-
|
|
23098
|
-
|
|
23099
|
-
|
|
23100
|
-
|
|
23101
|
-
|
|
23098
|
+
// https://github.com/coq/coq
|
|
23099
|
+
var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
|
|
23100
|
+
for (var i = 0; i < 2; i++) {
|
|
23101
|
+
commentSource = commentSource.replace(/<self>/g, function () {
|
|
23102
|
+
return commentSource
|
|
23103
|
+
});
|
|
23104
|
+
}
|
|
23105
|
+
commentSource = commentSource.replace(/<self>/g, '[]');
|
|
23106
|
+
Prism.languages.coq = {
|
|
23107
|
+
comment: RegExp(commentSource),
|
|
23108
|
+
string: {
|
|
23109
|
+
pattern: /"(?:[^"]|"")*"(?!")/,
|
|
23110
|
+
greedy: true
|
|
23111
|
+
},
|
|
23112
|
+
attribute: [
|
|
23113
|
+
{
|
|
23114
|
+
pattern: RegExp(
|
|
23115
|
+
/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
|
|
23116
|
+
/<comment>/g,
|
|
23117
|
+
function () {
|
|
23118
|
+
return commentSource
|
|
23119
|
+
}
|
|
23120
|
+
)
|
|
23121
|
+
),
|
|
23122
|
+
greedy: true,
|
|
23123
|
+
alias: 'attr-name',
|
|
23124
|
+
inside: {
|
|
23125
|
+
comment: RegExp(commentSource),
|
|
23126
|
+
string: {
|
|
23127
|
+
pattern: /"(?:[^"]|"")*"(?!")/,
|
|
23128
|
+
greedy: true
|
|
23129
|
+
},
|
|
23130
|
+
operator: /=/,
|
|
23131
|
+
punctuation: /^#\[|\]$|[,()]/
|
|
23132
|
+
}
|
|
23133
|
+
},
|
|
23134
|
+
{
|
|
23135
|
+
pattern:
|
|
23136
|
+
/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
|
|
23137
|
+
alias: 'attr-name'
|
|
23138
|
+
}
|
|
23139
|
+
],
|
|
23140
|
+
keyword:
|
|
23141
|
+
/\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/,
|
|
23142
|
+
number:
|
|
23143
|
+
/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
|
|
23144
|
+
punct: {
|
|
23145
|
+
pattern: /@\{|\{\||\[=|:>/,
|
|
23146
|
+
alias: 'punctuation'
|
|
23147
|
+
},
|
|
23148
|
+
operator:
|
|
23149
|
+
/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
|
|
23150
|
+
punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
|
|
23151
|
+
};
|
|
23152
|
+
})(Prism);
|
|
23153
|
+
}
|
|
23154
|
+
return coq_1;
|
|
23102
23155
|
}
|
|
23103
23156
|
|
|
23104
|
-
var ruby_1
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
function
|
|
23157
|
+
var ruby_1;
|
|
23158
|
+
var hasRequiredRuby;
|
|
23159
|
+
|
|
23160
|
+
function requireRuby () {
|
|
23161
|
+
if (hasRequiredRuby) return ruby_1;
|
|
23162
|
+
hasRequiredRuby = 1;
|
|
23163
|
+
|
|
23164
|
+
ruby_1 = ruby;
|
|
23165
|
+
ruby.displayName = 'ruby';
|
|
23166
|
+
ruby.aliases = ['rb'];
|
|
23167
|
+
function ruby(Prism) {
|
|
23108
23168
|
(function (Prism) {
|
|
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
|
-
|
|
23172
|
-
|
|
23173
|
-
|
|
23174
|
-
|
|
23175
|
-
|
|
23176
|
-
|
|
23177
|
-
|
|
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
|
-
|
|
23243
|
-
|
|
23244
|
-
|
|
23245
|
-
|
|
23246
|
-
|
|
23247
|
-
|
|
23248
|
-
|
|
23249
|
-
|
|
23250
|
-
|
|
23251
|
-
|
|
23252
|
-
|
|
23253
|
-
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
|
|
23257
|
-
|
|
23258
|
-
|
|
23259
|
-
|
|
23260
|
-
|
|
23261
|
-
|
|
23262
|
-
|
|
23263
|
-
|
|
23264
|
-
|
|
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
|
-
|
|
23169
|
+
Prism.languages.ruby = Prism.languages.extend('clike', {
|
|
23170
|
+
comment: {
|
|
23171
|
+
pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
|
|
23172
|
+
greedy: true
|
|
23173
|
+
},
|
|
23174
|
+
'class-name': {
|
|
23175
|
+
pattern:
|
|
23176
|
+
/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
|
|
23177
|
+
lookbehind: true,
|
|
23178
|
+
inside: {
|
|
23179
|
+
punctuation: /[.\\]/
|
|
23180
|
+
}
|
|
23181
|
+
},
|
|
23182
|
+
keyword:
|
|
23183
|
+
/\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/,
|
|
23184
|
+
operator:
|
|
23185
|
+
/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
|
|
23186
|
+
punctuation: /[(){}[\].,;]/
|
|
23187
|
+
});
|
|
23188
|
+
Prism.languages.insertBefore('ruby', 'operator', {
|
|
23189
|
+
'double-colon': {
|
|
23190
|
+
pattern: /::/,
|
|
23191
|
+
alias: 'punctuation'
|
|
23192
|
+
}
|
|
23193
|
+
});
|
|
23194
|
+
var interpolation = {
|
|
23195
|
+
pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
|
|
23196
|
+
lookbehind: true,
|
|
23197
|
+
inside: {
|
|
23198
|
+
content: {
|
|
23199
|
+
pattern: /^(#\{)[\s\S]+(?=\}$)/,
|
|
23200
|
+
lookbehind: true,
|
|
23201
|
+
inside: Prism.languages.ruby
|
|
23202
|
+
},
|
|
23203
|
+
delimiter: {
|
|
23204
|
+
pattern: /^#\{|\}$/,
|
|
23205
|
+
alias: 'punctuation'
|
|
23206
|
+
}
|
|
23207
|
+
}
|
|
23208
|
+
};
|
|
23209
|
+
delete Prism.languages.ruby.function;
|
|
23210
|
+
var percentExpression =
|
|
23211
|
+
'(?:' +
|
|
23212
|
+
[
|
|
23213
|
+
/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
|
|
23214
|
+
/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
|
|
23215
|
+
/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
|
|
23216
|
+
/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
|
|
23217
|
+
/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
|
|
23218
|
+
].join('|') +
|
|
23219
|
+
')';
|
|
23220
|
+
var symbolName =
|
|
23221
|
+
/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
|
|
23222
|
+
.source;
|
|
23223
|
+
Prism.languages.insertBefore('ruby', 'keyword', {
|
|
23224
|
+
'regex-literal': [
|
|
23225
|
+
{
|
|
23226
|
+
pattern: RegExp(
|
|
23227
|
+
/%r/.source + percentExpression + /[egimnosux]{0,6}/.source
|
|
23228
|
+
),
|
|
23229
|
+
greedy: true,
|
|
23230
|
+
inside: {
|
|
23231
|
+
interpolation: interpolation,
|
|
23232
|
+
regex: /[\s\S]+/
|
|
23233
|
+
}
|
|
23234
|
+
},
|
|
23235
|
+
{
|
|
23236
|
+
pattern:
|
|
23237
|
+
/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
|
|
23238
|
+
lookbehind: true,
|
|
23239
|
+
greedy: true,
|
|
23240
|
+
inside: {
|
|
23241
|
+
interpolation: interpolation,
|
|
23242
|
+
regex: /[\s\S]+/
|
|
23243
|
+
}
|
|
23244
|
+
}
|
|
23245
|
+
],
|
|
23246
|
+
variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
|
|
23247
|
+
symbol: [
|
|
23248
|
+
{
|
|
23249
|
+
pattern: RegExp(/(^|[^:]):/.source + symbolName),
|
|
23250
|
+
lookbehind: true,
|
|
23251
|
+
greedy: true
|
|
23252
|
+
},
|
|
23253
|
+
{
|
|
23254
|
+
pattern: RegExp(
|
|
23255
|
+
/([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
|
|
23256
|
+
),
|
|
23257
|
+
lookbehind: true,
|
|
23258
|
+
greedy: true
|
|
23259
|
+
}
|
|
23260
|
+
],
|
|
23261
|
+
'method-definition': {
|
|
23262
|
+
pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
|
|
23263
|
+
lookbehind: true,
|
|
23264
|
+
inside: {
|
|
23265
|
+
function: /\b\w+$/,
|
|
23266
|
+
keyword: /^self\b/,
|
|
23267
|
+
'class-name': /^\w+/,
|
|
23268
|
+
punctuation: /\./
|
|
23269
|
+
}
|
|
23270
|
+
}
|
|
23271
|
+
});
|
|
23272
|
+
Prism.languages.insertBefore('ruby', 'string', {
|
|
23273
|
+
'string-literal': [
|
|
23274
|
+
{
|
|
23275
|
+
pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
|
|
23276
|
+
greedy: true,
|
|
23277
|
+
inside: {
|
|
23278
|
+
interpolation: interpolation,
|
|
23279
|
+
string: /[\s\S]+/
|
|
23280
|
+
}
|
|
23281
|
+
},
|
|
23282
|
+
{
|
|
23283
|
+
pattern:
|
|
23284
|
+
/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
|
|
23285
|
+
greedy: true,
|
|
23286
|
+
inside: {
|
|
23287
|
+
interpolation: interpolation,
|
|
23288
|
+
string: /[\s\S]+/
|
|
23289
|
+
}
|
|
23290
|
+
},
|
|
23291
|
+
{
|
|
23292
|
+
pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
23293
|
+
alias: 'heredoc-string',
|
|
23294
|
+
greedy: true,
|
|
23295
|
+
inside: {
|
|
23296
|
+
delimiter: {
|
|
23297
|
+
pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
|
|
23298
|
+
inside: {
|
|
23299
|
+
symbol: /\b\w+/,
|
|
23300
|
+
punctuation: /^<<[-~]?/
|
|
23301
|
+
}
|
|
23302
|
+
},
|
|
23303
|
+
interpolation: interpolation,
|
|
23304
|
+
string: /[\s\S]+/
|
|
23305
|
+
}
|
|
23306
|
+
},
|
|
23307
|
+
{
|
|
23308
|
+
pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
23309
|
+
alias: 'heredoc-string',
|
|
23310
|
+
greedy: true,
|
|
23311
|
+
inside: {
|
|
23312
|
+
delimiter: {
|
|
23313
|
+
pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
|
|
23314
|
+
inside: {
|
|
23315
|
+
symbol: /\b\w+/,
|
|
23316
|
+
punctuation: /^<<[-~]?'|'$/
|
|
23317
|
+
}
|
|
23318
|
+
},
|
|
23319
|
+
string: /[\s\S]+/
|
|
23320
|
+
}
|
|
23321
|
+
}
|
|
23322
|
+
],
|
|
23323
|
+
'command-literal': [
|
|
23324
|
+
{
|
|
23325
|
+
pattern: RegExp(/%x/.source + percentExpression),
|
|
23326
|
+
greedy: true,
|
|
23327
|
+
inside: {
|
|
23328
|
+
interpolation: interpolation,
|
|
23329
|
+
command: {
|
|
23330
|
+
pattern: /[\s\S]+/,
|
|
23331
|
+
alias: 'string'
|
|
23332
|
+
}
|
|
23333
|
+
}
|
|
23334
|
+
},
|
|
23335
|
+
{
|
|
23336
|
+
pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
|
|
23337
|
+
greedy: true,
|
|
23338
|
+
inside: {
|
|
23339
|
+
interpolation: interpolation,
|
|
23340
|
+
command: {
|
|
23341
|
+
pattern: /[\s\S]+/,
|
|
23342
|
+
alias: 'string'
|
|
23343
|
+
}
|
|
23344
|
+
}
|
|
23345
|
+
}
|
|
23346
|
+
]
|
|
23347
|
+
});
|
|
23348
|
+
delete Prism.languages.ruby.string;
|
|
23349
|
+
Prism.languages.insertBefore('ruby', 'number', {
|
|
23350
|
+
builtin:
|
|
23351
|
+
/\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/,
|
|
23352
|
+
constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
|
|
23353
|
+
});
|
|
23354
|
+
Prism.languages.rb = Prism.languages.ruby;
|
|
23355
|
+
})(Prism);
|
|
23356
|
+
}
|
|
23357
|
+
return ruby_1;
|
|
23296
23358
|
}
|
|
23297
23359
|
|
|
23298
|
-
var
|
|
23299
|
-
var
|
|
23300
|
-
crystal.displayName = 'crystal';
|
|
23301
|
-
crystal.aliases = [];
|
|
23302
|
-
function crystal(Prism) {
|
|
23303
|
-
Prism.register(refractorRuby)
|
|
23304
|
-
;(function (Prism) {
|
|
23305
|
-
Prism.languages.crystal = Prism.languages.extend('ruby', {
|
|
23306
|
-
keyword: [
|
|
23307
|
-
/\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/,
|
|
23308
|
-
{
|
|
23309
|
-
pattern: /(\.\s*)(?:is_a|responds_to)\?/,
|
|
23310
|
-
lookbehind: true
|
|
23311
|
-
}
|
|
23312
|
-
],
|
|
23313
|
-
number:
|
|
23314
|
-
/\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/,
|
|
23315
|
-
operator: [/->/, Prism.languages.ruby.operator],
|
|
23316
|
-
punctuation: /[(){}[\].,;\\]/
|
|
23317
|
-
});
|
|
23318
|
-
Prism.languages.insertBefore('crystal', 'string-literal', {
|
|
23319
|
-
attribute: {
|
|
23320
|
-
pattern: /@\[.*?\]/,
|
|
23321
|
-
inside: {
|
|
23322
|
-
delimiter: {
|
|
23323
|
-
pattern: /^@\[|\]$/,
|
|
23324
|
-
alias: 'punctuation'
|
|
23325
|
-
},
|
|
23326
|
-
attribute: {
|
|
23327
|
-
pattern: /^(\s*)\w+/,
|
|
23328
|
-
lookbehind: true,
|
|
23329
|
-
alias: 'class-name'
|
|
23330
|
-
},
|
|
23331
|
-
args: {
|
|
23332
|
-
pattern: /\S(?:[\s\S]*\S)?/,
|
|
23333
|
-
inside: Prism.languages.crystal
|
|
23334
|
-
}
|
|
23335
|
-
}
|
|
23336
|
-
},
|
|
23337
|
-
expansion: {
|
|
23338
|
-
pattern: /\{(?:\{.*?\}|%.*?%)\}/,
|
|
23339
|
-
inside: {
|
|
23340
|
-
content: {
|
|
23341
|
-
pattern: /^(\{.)[\s\S]+(?=.\}$)/,
|
|
23342
|
-
lookbehind: true,
|
|
23343
|
-
inside: Prism.languages.crystal
|
|
23344
|
-
},
|
|
23345
|
-
delimiter: {
|
|
23346
|
-
pattern: /^\{[\{%]|[\}%]\}$/,
|
|
23347
|
-
alias: 'operator'
|
|
23348
|
-
}
|
|
23349
|
-
}
|
|
23350
|
-
},
|
|
23351
|
-
char: {
|
|
23352
|
-
pattern:
|
|
23353
|
-
/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
|
|
23354
|
-
greedy: true
|
|
23355
|
-
}
|
|
23356
|
-
});
|
|
23357
|
-
})(Prism);
|
|
23358
|
-
}
|
|
23360
|
+
var crystal_1;
|
|
23361
|
+
var hasRequiredCrystal;
|
|
23359
23362
|
|
|
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
|
-
|
|
23453
|
-
|
|
23454
|
-
|
|
23455
|
-
|
|
23456
|
-
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
|
|
23460
|
-
|
|
23461
|
-
|
|
23462
|
-
|
|
23463
|
-
|
|
23464
|
-
|
|
23465
|
-
|
|
23466
|
-
|
|
23467
|
-
|
|
23468
|
-
|
|
23469
|
-
|
|
23470
|
-
|
|
23471
|
-
|
|
23472
|
-
|
|
23473
|
-
|
|
23474
|
-
|
|
23475
|
-
|
|
23476
|
-
|
|
23477
|
-
|
|
23478
|
-
|
|
23479
|
-
|
|
23480
|
-
|
|
23481
|
-
|
|
23482
|
-
|
|
23483
|
-
|
|
23484
|
-
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
|
|
23489
|
-
|
|
23490
|
-
|
|
23491
|
-
|
|
23492
|
-
|
|
23493
|
-
|
|
23494
|
-
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
23498
|
-
|
|
23499
|
-
|
|
23500
|
-
|
|
23501
|
-
|
|
23502
|
-
|
|
23503
|
-
|
|
23504
|
-
|
|
23505
|
-
|
|
23506
|
-
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
|
|
23512
|
-
|
|
23513
|
-
|
|
23514
|
-
|
|
23515
|
-
|
|
23516
|
-
|
|
23517
|
-
|
|
23518
|
-
|
|
23519
|
-
|
|
23520
|
-
|
|
23521
|
-
|
|
23522
|
-
|
|
23523
|
-
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
23527
|
-
|
|
23528
|
-
|
|
23529
|
-
|
|
23530
|
-
|
|
23531
|
-
|
|
23532
|
-
|
|
23533
|
-
|
|
23534
|
-
|
|
23535
|
-
|
|
23536
|
-
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
23546
|
-
|
|
23547
|
-
|
|
23548
|
-
|
|
23549
|
-
|
|
23550
|
-
|
|
23551
|
-
|
|
23552
|
-
|
|
23553
|
-
|
|
23554
|
-
|
|
23555
|
-
|
|
23556
|
-
|
|
23557
|
-
|
|
23558
|
-
|
|
23559
|
-
|
|
23560
|
-
|
|
23561
|
-
|
|
23562
|
-
|
|
23563
|
-
|
|
23564
|
-
|
|
23565
|
-
|
|
23566
|
-
|
|
23567
|
-
|
|
23568
|
-
|
|
23569
|
-
|
|
23570
|
-
|
|
23571
|
-
|
|
23572
|
-
|
|
23573
|
-
|
|
23574
|
-
|
|
23363
|
+
function requireCrystal () {
|
|
23364
|
+
if (hasRequiredCrystal) return crystal_1;
|
|
23365
|
+
hasRequiredCrystal = 1;
|
|
23366
|
+
var refractorRuby = requireRuby();
|
|
23367
|
+
crystal_1 = crystal;
|
|
23368
|
+
crystal.displayName = 'crystal';
|
|
23369
|
+
crystal.aliases = [];
|
|
23370
|
+
function crystal(Prism) {
|
|
23371
|
+
Prism.register(refractorRuby)
|
|
23372
|
+
;(function (Prism) {
|
|
23373
|
+
Prism.languages.crystal = Prism.languages.extend('ruby', {
|
|
23374
|
+
keyword: [
|
|
23375
|
+
/\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/,
|
|
23376
|
+
{
|
|
23377
|
+
pattern: /(\.\s*)(?:is_a|responds_to)\?/,
|
|
23378
|
+
lookbehind: true
|
|
23379
|
+
}
|
|
23380
|
+
],
|
|
23381
|
+
number:
|
|
23382
|
+
/\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/,
|
|
23383
|
+
operator: [/->/, Prism.languages.ruby.operator],
|
|
23384
|
+
punctuation: /[(){}[\].,;\\]/
|
|
23385
|
+
});
|
|
23386
|
+
Prism.languages.insertBefore('crystal', 'string-literal', {
|
|
23387
|
+
attribute: {
|
|
23388
|
+
pattern: /@\[.*?\]/,
|
|
23389
|
+
inside: {
|
|
23390
|
+
delimiter: {
|
|
23391
|
+
pattern: /^@\[|\]$/,
|
|
23392
|
+
alias: 'punctuation'
|
|
23393
|
+
},
|
|
23394
|
+
attribute: {
|
|
23395
|
+
pattern: /^(\s*)\w+/,
|
|
23396
|
+
lookbehind: true,
|
|
23397
|
+
alias: 'class-name'
|
|
23398
|
+
},
|
|
23399
|
+
args: {
|
|
23400
|
+
pattern: /\S(?:[\s\S]*\S)?/,
|
|
23401
|
+
inside: Prism.languages.crystal
|
|
23402
|
+
}
|
|
23403
|
+
}
|
|
23404
|
+
},
|
|
23405
|
+
expansion: {
|
|
23406
|
+
pattern: /\{(?:\{.*?\}|%.*?%)\}/,
|
|
23407
|
+
inside: {
|
|
23408
|
+
content: {
|
|
23409
|
+
pattern: /^(\{.)[\s\S]+(?=.\}$)/,
|
|
23410
|
+
lookbehind: true,
|
|
23411
|
+
inside: Prism.languages.crystal
|
|
23412
|
+
},
|
|
23413
|
+
delimiter: {
|
|
23414
|
+
pattern: /^\{[\{%]|[\}%]\}$/,
|
|
23415
|
+
alias: 'operator'
|
|
23416
|
+
}
|
|
23417
|
+
}
|
|
23418
|
+
},
|
|
23419
|
+
char: {
|
|
23420
|
+
pattern:
|
|
23421
|
+
/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
|
|
23422
|
+
greedy: true
|
|
23423
|
+
}
|
|
23424
|
+
});
|
|
23425
|
+
})(Prism);
|
|
23426
|
+
}
|
|
23427
|
+
return crystal_1;
|
|
23428
|
+
}
|
|
23429
|
+
|
|
23430
|
+
var cshtml_1;
|
|
23431
|
+
var hasRequiredCshtml;
|
|
23432
|
+
|
|
23433
|
+
function requireCshtml () {
|
|
23434
|
+
if (hasRequiredCshtml) return cshtml_1;
|
|
23435
|
+
hasRequiredCshtml = 1;
|
|
23436
|
+
var refractorCsharp = requireCsharp();
|
|
23437
|
+
cshtml_1 = cshtml;
|
|
23438
|
+
cshtml.displayName = 'cshtml';
|
|
23439
|
+
cshtml.aliases = ['razor'];
|
|
23440
|
+
function cshtml(Prism) {
|
|
23441
|
+
Prism.register(refractorCsharp)
|
|
23442
|
+
// Docs:
|
|
23443
|
+
// https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio
|
|
23444
|
+
// https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-5.0
|
|
23445
|
+
;(function (Prism) {
|
|
23446
|
+
var commentLike = /\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//
|
|
23447
|
+
.source;
|
|
23448
|
+
var stringLike =
|
|
23449
|
+
/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source +
|
|
23450
|
+
'|' +
|
|
23451
|
+
/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;
|
|
23452
|
+
/**
|
|
23453
|
+
* Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
|
|
23454
|
+
*
|
|
23455
|
+
* @param {string} pattern
|
|
23456
|
+
* @param {number} depthLog2
|
|
23457
|
+
* @returns {string}
|
|
23458
|
+
*/
|
|
23459
|
+
function nested(pattern, depthLog2) {
|
|
23460
|
+
for (var i = 0; i < depthLog2; i++) {
|
|
23461
|
+
pattern = pattern.replace(/<self>/g, function () {
|
|
23462
|
+
return '(?:' + pattern + ')'
|
|
23463
|
+
});
|
|
23464
|
+
}
|
|
23465
|
+
return pattern
|
|
23466
|
+
.replace(/<self>/g, '[^\\s\\S]')
|
|
23467
|
+
.replace(/<str>/g, '(?:' + stringLike + ')')
|
|
23468
|
+
.replace(/<comment>/g, '(?:' + commentLike + ')')
|
|
23469
|
+
}
|
|
23470
|
+
var round = nested(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source, 2);
|
|
23471
|
+
var square = nested(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source, 2);
|
|
23472
|
+
var curly = nested(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source, 2);
|
|
23473
|
+
var angle = nested(/<(?:[^<>'"@/]|<str>|<comment>|<self>)*>/.source, 2); // Note about the above bracket patterns:
|
|
23474
|
+
// They all ignore HTML expressions that might be in the C# code. This is a problem because HTML (like strings and
|
|
23475
|
+
// comments) is parsed differently. This is a huge problem because HTML might contain brackets and quotes which
|
|
23476
|
+
// messes up the bracket and string counting implemented by the above patterns.
|
|
23477
|
+
//
|
|
23478
|
+
// This problem is not fixable because 1) HTML expression are highly context sensitive and very difficult to detect
|
|
23479
|
+
// and 2) they require one capturing group at every nested level. See the `tagRegion` pattern to admire the
|
|
23480
|
+
// complexity of an HTML expression.
|
|
23481
|
+
//
|
|
23482
|
+
// To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also
|
|
23483
|
+
// allows invalid characters to support HTML expressions like this: <p>That's it!</p>.
|
|
23484
|
+
var tagAttrs =
|
|
23485
|
+
/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/
|
|
23486
|
+
.source;
|
|
23487
|
+
var tagContent = /(?!\d)[^\s>\/=$<%]+/.source + tagAttrs + /\s*\/?>/.source;
|
|
23488
|
+
var tagRegion =
|
|
23489
|
+
/\B@?/.source +
|
|
23490
|
+
'(?:' +
|
|
23491
|
+
/<([a-zA-Z][\w:]*)/.source +
|
|
23492
|
+
tagAttrs +
|
|
23493
|
+
/\s*>/.source +
|
|
23494
|
+
'(?:' +
|
|
23495
|
+
(/[^<]/.source +
|
|
23496
|
+
'|' + // all tags that are not the start tag
|
|
23497
|
+
// eslint-disable-next-line regexp/strict
|
|
23498
|
+
/<\/?(?!\1\b)/.source +
|
|
23499
|
+
tagContent +
|
|
23500
|
+
'|' + // nested start tag
|
|
23501
|
+
nested(
|
|
23502
|
+
// eslint-disable-next-line regexp/strict
|
|
23503
|
+
/<\1/.source +
|
|
23504
|
+
tagAttrs +
|
|
23505
|
+
/\s*>/.source +
|
|
23506
|
+
'(?:' +
|
|
23507
|
+
(/[^<]/.source +
|
|
23508
|
+
'|' + // all tags that are not the start tag
|
|
23509
|
+
// eslint-disable-next-line regexp/strict
|
|
23510
|
+
/<\/?(?!\1\b)/.source +
|
|
23511
|
+
tagContent +
|
|
23512
|
+
'|' +
|
|
23513
|
+
'<self>') +
|
|
23514
|
+
')*' + // eslint-disable-next-line regexp/strict
|
|
23515
|
+
/<\/\1\s*>/.source,
|
|
23516
|
+
2
|
|
23517
|
+
)) +
|
|
23518
|
+
')*' + // eslint-disable-next-line regexp/strict
|
|
23519
|
+
/<\/\1\s*>/.source +
|
|
23520
|
+
'|' +
|
|
23521
|
+
/</.source +
|
|
23522
|
+
tagContent +
|
|
23523
|
+
')'; // Now for the actual language definition(s):
|
|
23524
|
+
//
|
|
23525
|
+
// Razor as a language has 2 parts:
|
|
23526
|
+
// 1) CSHTML: A markup-like language that has been extended with inline C# code expressions and blocks.
|
|
23527
|
+
// 2) C#+HTML: A variant of C# that can contain CSHTML tags as expressions.
|
|
23528
|
+
//
|
|
23529
|
+
// In the below code, both CSHTML and C#+HTML will be create as separate language definitions that reference each
|
|
23530
|
+
// other. However, only CSHTML will be exported via `Prism.languages`.
|
|
23531
|
+
Prism.languages.cshtml = Prism.languages.extend('markup', {});
|
|
23532
|
+
var csharpWithHtml = Prism.languages.insertBefore(
|
|
23533
|
+
'csharp',
|
|
23534
|
+
'string',
|
|
23535
|
+
{
|
|
23536
|
+
html: {
|
|
23537
|
+
pattern: RegExp(tagRegion),
|
|
23538
|
+
greedy: true,
|
|
23539
|
+
inside: Prism.languages.cshtml
|
|
23540
|
+
}
|
|
23541
|
+
},
|
|
23542
|
+
{
|
|
23543
|
+
csharp: Prism.languages.extend('csharp', {})
|
|
23544
|
+
}
|
|
23545
|
+
);
|
|
23546
|
+
var cs = {
|
|
23547
|
+
pattern: /\S[\s\S]*/,
|
|
23548
|
+
alias: 'language-csharp',
|
|
23549
|
+
inside: csharpWithHtml
|
|
23550
|
+
};
|
|
23551
|
+
Prism.languages.insertBefore('cshtml', 'prolog', {
|
|
23552
|
+
'razor-comment': {
|
|
23553
|
+
pattern: /@\*[\s\S]*?\*@/,
|
|
23554
|
+
greedy: true,
|
|
23555
|
+
alias: 'comment'
|
|
23556
|
+
},
|
|
23557
|
+
block: {
|
|
23558
|
+
pattern: RegExp(
|
|
23559
|
+
/(^|[^@])@/.source +
|
|
23560
|
+
'(?:' +
|
|
23561
|
+
[
|
|
23562
|
+
// @{ ... }
|
|
23563
|
+
curly, // @code{ ... }
|
|
23564
|
+
/(?:code|functions)\s*/.source + curly, // @for (...) { ... }
|
|
23565
|
+
/(?:for|foreach|lock|switch|using|while)\s*/.source +
|
|
23566
|
+
round +
|
|
23567
|
+
/\s*/.source +
|
|
23568
|
+
curly, // @do { ... } while (...);
|
|
23569
|
+
/do\s*/.source +
|
|
23570
|
+
curly +
|
|
23571
|
+
/\s*while\s*/.source +
|
|
23572
|
+
round +
|
|
23573
|
+
/(?:\s*;)?/.source, // @try { ... } catch (...) { ... } finally { ... }
|
|
23574
|
+
/try\s*/.source +
|
|
23575
|
+
curly +
|
|
23576
|
+
/\s*catch\s*/.source +
|
|
23577
|
+
round +
|
|
23578
|
+
/\s*/.source +
|
|
23579
|
+
curly +
|
|
23580
|
+
/\s*finally\s*/.source +
|
|
23581
|
+
curly, // @if (...) {...} else if (...) {...} else {...}
|
|
23582
|
+
/if\s*/.source +
|
|
23583
|
+
round +
|
|
23584
|
+
/\s*/.source +
|
|
23585
|
+
curly +
|
|
23586
|
+
'(?:' +
|
|
23587
|
+
/\s*else/.source +
|
|
23588
|
+
'(?:' +
|
|
23589
|
+
/\s+if\s*/.source +
|
|
23590
|
+
round +
|
|
23591
|
+
')?' +
|
|
23592
|
+
/\s*/.source +
|
|
23593
|
+
curly +
|
|
23594
|
+
')*'
|
|
23595
|
+
].join('|') +
|
|
23596
|
+
')'
|
|
23597
|
+
),
|
|
23598
|
+
lookbehind: true,
|
|
23599
|
+
greedy: true,
|
|
23600
|
+
inside: {
|
|
23601
|
+
keyword: /^@\w*/,
|
|
23602
|
+
csharp: cs
|
|
23603
|
+
}
|
|
23604
|
+
},
|
|
23605
|
+
directive: {
|
|
23606
|
+
pattern:
|
|
23607
|
+
/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,
|
|
23608
|
+
lookbehind: true,
|
|
23609
|
+
greedy: true,
|
|
23610
|
+
inside: {
|
|
23611
|
+
keyword: /^@\w+/,
|
|
23612
|
+
csharp: cs
|
|
23613
|
+
}
|
|
23614
|
+
},
|
|
23615
|
+
value: {
|
|
23616
|
+
pattern: RegExp(
|
|
23617
|
+
/(^|[^@])@/.source +
|
|
23618
|
+
/(?:await\b\s*)?/.source +
|
|
23619
|
+
'(?:' +
|
|
23620
|
+
/\w+\b/.source +
|
|
23621
|
+
'|' +
|
|
23622
|
+
round +
|
|
23623
|
+
')' +
|
|
23624
|
+
'(?:' +
|
|
23625
|
+
/[?!]?\.\w+\b/.source +
|
|
23626
|
+
'|' +
|
|
23627
|
+
round +
|
|
23628
|
+
'|' +
|
|
23629
|
+
square +
|
|
23630
|
+
'|' +
|
|
23631
|
+
angle +
|
|
23632
|
+
round +
|
|
23633
|
+
')*'
|
|
23634
|
+
),
|
|
23635
|
+
lookbehind: true,
|
|
23636
|
+
greedy: true,
|
|
23637
|
+
alias: 'variable',
|
|
23638
|
+
inside: {
|
|
23639
|
+
keyword: /^@/,
|
|
23640
|
+
csharp: cs
|
|
23641
|
+
}
|
|
23642
|
+
},
|
|
23643
|
+
'delegate-operator': {
|
|
23644
|
+
pattern: /(^|[^@])@(?=<)/,
|
|
23645
|
+
lookbehind: true,
|
|
23646
|
+
alias: 'operator'
|
|
23647
|
+
}
|
|
23648
|
+
});
|
|
23649
|
+
Prism.languages.razor = Prism.languages.cshtml;
|
|
23650
|
+
})(Prism);
|
|
23651
|
+
}
|
|
23652
|
+
return cshtml_1;
|
|
23575
23653
|
}
|
|
23576
23654
|
|
|
23577
|
-
var csp_1
|
|
23578
|
-
|
|
23579
|
-
|
|
23580
|
-
function
|
|
23655
|
+
var csp_1;
|
|
23656
|
+
var hasRequiredCsp;
|
|
23657
|
+
|
|
23658
|
+
function requireCsp () {
|
|
23659
|
+
if (hasRequiredCsp) return csp_1;
|
|
23660
|
+
hasRequiredCsp = 1;
|
|
23661
|
+
|
|
23662
|
+
csp_1 = csp;
|
|
23663
|
+
csp.displayName = 'csp';
|
|
23664
|
+
csp.aliases = [];
|
|
23665
|
+
function csp(Prism) {
|
|
23581
23666
|
(function (Prism) {
|
|
23582
|
-
|
|
23583
|
-
|
|
23584
|
-
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
|
|
23591
|
-
|
|
23592
|
-
|
|
23593
|
-
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
-
|
|
23605
|
-
|
|
23606
|
-
|
|
23607
|
-
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23613
|
-
|
|
23614
|
-
|
|
23615
|
-
|
|
23616
|
-
|
|
23617
|
-
|
|
23618
|
-
|
|
23619
|
-
|
|
23620
|
-
|
|
23621
|
-
|
|
23622
|
-
|
|
23623
|
-
|
|
23624
|
-
|
|
23625
|
-
|
|
23626
|
-
|
|
23627
|
-
|
|
23628
|
-
|
|
23629
|
-
|
|
23630
|
-
|
|
23631
|
-
|
|
23632
|
-
|
|
23633
|
-
|
|
23634
|
-
|
|
23635
|
-
|
|
23636
|
-
|
|
23637
|
-
|
|
23638
|
-
|
|
23639
|
-
|
|
23640
|
-
|
|
23641
|
-
|
|
23642
|
-
|
|
23643
|
-
|
|
23644
|
-
|
|
23645
|
-
|
|
23646
|
-
|
|
23667
|
+
/**
|
|
23668
|
+
* @param {string} source
|
|
23669
|
+
* @returns {RegExp}
|
|
23670
|
+
*/
|
|
23671
|
+
function value(source) {
|
|
23672
|
+
return RegExp(
|
|
23673
|
+
/([ \t])/.source + '(?:' + source + ')' + /(?=[\s;]|$)/.source,
|
|
23674
|
+
'i'
|
|
23675
|
+
)
|
|
23676
|
+
}
|
|
23677
|
+
Prism.languages.csp = {
|
|
23678
|
+
directive: {
|
|
23679
|
+
pattern:
|
|
23680
|
+
/(^|[\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,
|
|
23681
|
+
lookbehind: true,
|
|
23682
|
+
alias: 'property'
|
|
23683
|
+
},
|
|
23684
|
+
scheme: {
|
|
23685
|
+
pattern: value(/[a-z][a-z0-9.+-]*:/.source),
|
|
23686
|
+
lookbehind: true
|
|
23687
|
+
},
|
|
23688
|
+
none: {
|
|
23689
|
+
pattern: value(/'none'/.source),
|
|
23690
|
+
lookbehind: true,
|
|
23691
|
+
alias: 'keyword'
|
|
23692
|
+
},
|
|
23693
|
+
nonce: {
|
|
23694
|
+
pattern: value(/'nonce-[-+/\w=]+'/.source),
|
|
23695
|
+
lookbehind: true,
|
|
23696
|
+
alias: 'number'
|
|
23697
|
+
},
|
|
23698
|
+
hash: {
|
|
23699
|
+
pattern: value(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
|
|
23700
|
+
lookbehind: true,
|
|
23701
|
+
alias: 'number'
|
|
23702
|
+
},
|
|
23703
|
+
host: {
|
|
23704
|
+
pattern: value(
|
|
23705
|
+
/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source +
|
|
23706
|
+
'|' +
|
|
23707
|
+
/\*[^\s;,']*/.source +
|
|
23708
|
+
'|' +
|
|
23709
|
+
/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source
|
|
23710
|
+
),
|
|
23711
|
+
lookbehind: true,
|
|
23712
|
+
alias: 'url',
|
|
23713
|
+
inside: {
|
|
23714
|
+
important: /\*/
|
|
23715
|
+
}
|
|
23716
|
+
},
|
|
23717
|
+
keyword: [
|
|
23718
|
+
{
|
|
23719
|
+
pattern: value(/'unsafe-[a-z-]+'/.source),
|
|
23720
|
+
lookbehind: true,
|
|
23721
|
+
alias: 'unsafe'
|
|
23722
|
+
},
|
|
23723
|
+
{
|
|
23724
|
+
pattern: value(/'[a-z-]+'/.source),
|
|
23725
|
+
lookbehind: true,
|
|
23726
|
+
alias: 'safe'
|
|
23727
|
+
}
|
|
23728
|
+
],
|
|
23729
|
+
punctuation: /;/
|
|
23730
|
+
};
|
|
23731
|
+
})(Prism);
|
|
23732
|
+
}
|
|
23733
|
+
return csp_1;
|
|
23647
23734
|
}
|
|
23648
23735
|
|
|
23649
23736
|
var cssExtras_1;
|
|
@@ -25110,7 +25197,7 @@ var hasRequiredErb;
|
|
|
25110
25197
|
function requireErb () {
|
|
25111
25198
|
if (hasRequiredErb) return erb_1;
|
|
25112
25199
|
hasRequiredErb = 1;
|
|
25113
|
-
var refractorRuby =
|
|
25200
|
+
var refractorRuby = requireRuby();
|
|
25114
25201
|
var refractorMarkupTemplating = requireMarkupTemplating();
|
|
25115
25202
|
erb_1 = erb;
|
|
25116
25203
|
erb.displayName = 'erb';
|
|
@@ -27592,7 +27679,7 @@ var hasRequiredHaml;
|
|
|
27592
27679
|
function requireHaml () {
|
|
27593
27680
|
if (hasRequiredHaml) return haml_1;
|
|
27594
27681
|
hasRequiredHaml = 1;
|
|
27595
|
-
var refractorRuby =
|
|
27682
|
+
var refractorRuby = requireRuby();
|
|
27596
27683
|
haml_1 = haml;
|
|
27597
27684
|
haml.displayName = 'haml';
|
|
27598
27685
|
haml.aliases = [];
|
|
@@ -40028,7 +40115,7 @@ function requireT4Cs () {
|
|
|
40028
40115
|
if (hasRequiredT4Cs) return t4Cs_1;
|
|
40029
40116
|
hasRequiredT4Cs = 1;
|
|
40030
40117
|
var refractorT4Templating = requireT4Templating();
|
|
40031
|
-
var refractorCsharp =
|
|
40118
|
+
var refractorCsharp = requireCsharp();
|
|
40032
40119
|
t4Cs_1 = t4Cs;
|
|
40033
40120
|
t4Cs.displayName = 't4Cs';
|
|
40034
40121
|
t4Cs.aliases = [];
|
|
@@ -42800,20 +42887,20 @@ refractor.register(brightscript_1);
|
|
|
42800
42887
|
refractor.register(bro_1);
|
|
42801
42888
|
refractor.register(bsl_1);
|
|
42802
42889
|
refractor.register(c_1);
|
|
42803
|
-
refractor.register(
|
|
42890
|
+
refractor.register(requireCfscript());
|
|
42804
42891
|
refractor.register(chaiscript_1);
|
|
42805
42892
|
refractor.register(cil_1);
|
|
42806
42893
|
refractor.register(clojure_1);
|
|
42807
42894
|
refractor.register(cmake_1);
|
|
42808
42895
|
refractor.register(cobol_1);
|
|
42809
|
-
refractor.register(
|
|
42810
|
-
refractor.register(
|
|
42811
|
-
refractor.register(
|
|
42812
|
-
refractor.register(
|
|
42813
|
-
refractor.register(
|
|
42814
|
-
refractor.register(
|
|
42815
|
-
refractor.register(
|
|
42816
|
-
refractor.register(
|
|
42896
|
+
refractor.register(requireCoffeescript());
|
|
42897
|
+
refractor.register(requireConcurnas());
|
|
42898
|
+
refractor.register(requireCoq());
|
|
42899
|
+
refractor.register(requireCpp());
|
|
42900
|
+
refractor.register(requireCrystal());
|
|
42901
|
+
refractor.register(requireCsharp());
|
|
42902
|
+
refractor.register(requireCshtml());
|
|
42903
|
+
refractor.register(requireCsp());
|
|
42817
42904
|
refractor.register(requireCssExtras());
|
|
42818
42905
|
refractor.register(requireCsv());
|
|
42819
42906
|
refractor.register(requireCypher());
|
|
@@ -42976,7 +43063,7 @@ refractor.register(requireRest());
|
|
|
42976
43063
|
refractor.register(requireRip());
|
|
42977
43064
|
refractor.register(requireRoboconf());
|
|
42978
43065
|
refractor.register(requireRobotframework());
|
|
42979
|
-
refractor.register(
|
|
43066
|
+
refractor.register(requireRuby());
|
|
42980
43067
|
refractor.register(requireRust());
|
|
42981
43068
|
refractor.register(requireSas());
|
|
42982
43069
|
refractor.register(requireSass());
|
|
@@ -109777,7 +109864,11 @@ var BaseAreaChart = function BaseAreaChart(props) {
|
|
|
109777
109864
|
show: xAxisLabelShow
|
|
109778
109865
|
},
|
|
109779
109866
|
splitLine: {
|
|
109780
|
-
show: xSplitLineShow
|
|
109867
|
+
show: xSplitLineShow,
|
|
109868
|
+
lineStyle: {
|
|
109869
|
+
color: axisSplitColor,
|
|
109870
|
+
type: splitType
|
|
109871
|
+
}
|
|
109781
109872
|
},
|
|
109782
109873
|
axisLine: {
|
|
109783
109874
|
show: xAxisLineShow
|
|
@@ -110325,7 +110416,9 @@ var generateOptions = function generateOptions(optionData) {
|
|
|
110325
110416
|
return null;
|
|
110326
110417
|
}
|
|
110327
110418
|
};
|
|
110328
|
-
|
|
110419
|
+
|
|
110420
|
+
// eslint-disable-next-line prefer-arrow-callback
|
|
110421
|
+
var BaseWidget = /*#__PURE__*/React.forwardRef(function BaseWidget(props, ref) {
|
|
110329
110422
|
var _options$length, _options$length2;
|
|
110330
110423
|
// eslint-disable-next-line object-curly-newline
|
|
110331
110424
|
var loading = props.loading,
|
|
@@ -110339,7 +110432,11 @@ var BaseWidget = function BaseWidget(props) {
|
|
|
110339
110432
|
fallbackProps = props.fallbackProps,
|
|
110340
110433
|
theme = props.theme,
|
|
110341
110434
|
setFallback = props.setFallback,
|
|
110342
|
-
showFallback = props.showFallback
|
|
110435
|
+
showFallback = props.showFallback,
|
|
110436
|
+
style = props.style,
|
|
110437
|
+
onMouseDown = props.onMouseDown,
|
|
110438
|
+
onMouseUp = props.onMouseUp,
|
|
110439
|
+
onTouchEnd = props.onTouchEnd;
|
|
110343
110440
|
var emptyChartData = React.useMemo(function () {
|
|
110344
110441
|
return React.Children.toArray(children).every(function (child) {
|
|
110345
110442
|
var _child$props$seriesDa, _child$props, _child$props$seriesDa2;
|
|
@@ -110351,7 +110448,12 @@ var BaseWidget = function BaseWidget(props) {
|
|
|
110351
110448
|
setFallback(emptyChartData);
|
|
110352
110449
|
}, [emptyChartData]);
|
|
110353
110450
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
110451
|
+
ref: ref,
|
|
110354
110452
|
className: classes(modules_6a0e74b6.root, className),
|
|
110453
|
+
style: style,
|
|
110454
|
+
onMouseDown: onMouseDown,
|
|
110455
|
+
onMouseUp: onMouseUp,
|
|
110456
|
+
onTouchEnd: onTouchEnd,
|
|
110355
110457
|
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
110356
110458
|
className: modules_6a0e74b6.header,
|
|
110357
110459
|
"data-elem": "header",
|
|
@@ -110397,7 +110499,7 @@ var BaseWidget = function BaseWidget(props) {
|
|
|
110397
110499
|
})]
|
|
110398
110500
|
})]
|
|
110399
110501
|
});
|
|
110400
|
-
};
|
|
110502
|
+
});
|
|
110401
110503
|
BaseWidget.propTypes = {
|
|
110402
110504
|
loading: propTypes$1.exports.bool,
|
|
110403
110505
|
title: propTypes$1.exports.string,
|