@banyan_cloud/roots 1.0.58 → 1.0.59

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 CHANGED
@@ -17252,134 +17252,126 @@ function c(Prism) {
17252
17252
  delete Prism.languages.c['boolean'];
17253
17253
  }
17254
17254
 
17255
- var cpp_1;
17256
- var hasRequiredCpp;
17257
-
17258
- function requireCpp () {
17259
- if (hasRequiredCpp) return cpp_1;
17260
- hasRequiredCpp = 1;
17261
- var refractorC = c_1;
17262
- cpp_1 = cpp;
17263
- cpp.displayName = 'cpp';
17264
- cpp.aliases = [];
17265
- function cpp(Prism) {
17266
- Prism.register(refractorC)
17267
- ;(function (Prism) {
17268
- var keyword =
17269
- /\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/;
17270
- var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
17271
- /<keyword>/g,
17272
- function () {
17273
- return keyword.source
17274
- }
17275
- );
17276
- Prism.languages.cpp = Prism.languages.extend('c', {
17277
- 'class-name': [
17278
- {
17279
- pattern: RegExp(
17280
- /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
17281
- /<keyword>/g,
17282
- function () {
17283
- return keyword.source
17284
- }
17285
- )
17286
- ),
17287
- lookbehind: true
17288
- }, // This is intended to capture the class name of method implementations like:
17289
- // void foo::bar() const {}
17290
- // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
17291
- // it starts with an uppercase letter. This approximation should give decent results.
17292
- /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
17293
- // Foo::~Foo() {}
17294
- /\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
17295
- // parameters, so it can't be a namespace (until C++ adds generic namespaces).
17296
- /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
17297
- ],
17298
- keyword: keyword,
17299
- number: {
17300
- pattern:
17301
- /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
17302
- greedy: true
17303
- },
17304
- operator:
17305
- />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
17306
- boolean: /\b(?:false|true)\b/
17307
- });
17308
- Prism.languages.insertBefore('cpp', 'string', {
17309
- module: {
17310
- // https://en.cppreference.com/w/cpp/language/modules
17311
- pattern: RegExp(
17312
- /(\b(?:import|module)\s+)/.source +
17313
- '(?:' + // header-name
17314
- /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
17315
- '|' + // module name or partition or both
17316
- /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
17317
- /<mod-name>/g,
17318
- function () {
17319
- return modName
17320
- }
17321
- ) +
17322
- ')'
17323
- ),
17324
- lookbehind: true,
17325
- greedy: true,
17326
- inside: {
17327
- string: /^[<"][\s\S]+/,
17328
- operator: /:/,
17329
- punctuation: /\./
17330
- }
17331
- },
17332
- 'raw-string': {
17333
- pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
17334
- alias: 'string',
17335
- greedy: true
17336
- }
17337
- });
17338
- Prism.languages.insertBefore('cpp', 'keyword', {
17339
- 'generic-function': {
17340
- pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
17341
- inside: {
17342
- function: /^\w+/,
17343
- generic: {
17344
- pattern: /<[\s\S]+/,
17345
- alias: 'class-name',
17346
- inside: Prism.languages.cpp
17347
- }
17348
- }
17349
- }
17350
- });
17351
- Prism.languages.insertBefore('cpp', 'operator', {
17352
- 'double-colon': {
17353
- pattern: /::/,
17354
- alias: 'punctuation'
17355
- }
17356
- });
17357
- Prism.languages.insertBefore('cpp', 'class-name', {
17358
- // the base clause is an optional list of parent classes
17359
- // https://en.cppreference.com/w/cpp/language/class
17360
- 'base-clause': {
17361
- pattern:
17362
- /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
17363
- lookbehind: true,
17364
- greedy: true,
17365
- inside: Prism.languages.extend('cpp', {})
17366
- }
17367
- });
17368
- Prism.languages.insertBefore(
17369
- 'inside',
17370
- 'double-colon',
17371
- {
17372
- // All untokenized words that are not namespaces should be class names
17373
- 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
17374
- },
17375
- Prism.languages.cpp['base-clause']
17376
- );
17377
- })(Prism);
17378
- }
17379
- return cpp_1;
17255
+ var refractorC$1 = c_1;
17256
+ var cpp_1 = cpp;
17257
+ cpp.displayName = 'cpp';
17258
+ cpp.aliases = [];
17259
+ function cpp(Prism) {
17260
+ Prism.register(refractorC$1)
17261
+ ;(function (Prism) {
17262
+ var keyword =
17263
+ /\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/;
17264
+ var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
17265
+ /<keyword>/g,
17266
+ function () {
17267
+ return keyword.source
17268
+ }
17269
+ );
17270
+ Prism.languages.cpp = Prism.languages.extend('c', {
17271
+ 'class-name': [
17272
+ {
17273
+ pattern: RegExp(
17274
+ /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
17275
+ /<keyword>/g,
17276
+ function () {
17277
+ return keyword.source
17278
+ }
17279
+ )
17280
+ ),
17281
+ lookbehind: true
17282
+ }, // This is intended to capture the class name of method implementations like:
17283
+ // void foo::bar() const {}
17284
+ // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
17285
+ // it starts with an uppercase letter. This approximation should give decent results.
17286
+ /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
17287
+ // Foo::~Foo() {}
17288
+ /\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
17289
+ // parameters, so it can't be a namespace (until C++ adds generic namespaces).
17290
+ /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
17291
+ ],
17292
+ keyword: keyword,
17293
+ number: {
17294
+ pattern:
17295
+ /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
17296
+ greedy: true
17297
+ },
17298
+ operator:
17299
+ />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
17300
+ boolean: /\b(?:false|true)\b/
17301
+ });
17302
+ Prism.languages.insertBefore('cpp', 'string', {
17303
+ module: {
17304
+ // https://en.cppreference.com/w/cpp/language/modules
17305
+ pattern: RegExp(
17306
+ /(\b(?:import|module)\s+)/.source +
17307
+ '(?:' + // header-name
17308
+ /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
17309
+ '|' + // module name or partition or both
17310
+ /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
17311
+ /<mod-name>/g,
17312
+ function () {
17313
+ return modName
17314
+ }
17315
+ ) +
17316
+ ')'
17317
+ ),
17318
+ lookbehind: true,
17319
+ greedy: true,
17320
+ inside: {
17321
+ string: /^[<"][\s\S]+/,
17322
+ operator: /:/,
17323
+ punctuation: /\./
17324
+ }
17325
+ },
17326
+ 'raw-string': {
17327
+ pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
17328
+ alias: 'string',
17329
+ greedy: true
17330
+ }
17331
+ });
17332
+ Prism.languages.insertBefore('cpp', 'keyword', {
17333
+ 'generic-function': {
17334
+ pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
17335
+ inside: {
17336
+ function: /^\w+/,
17337
+ generic: {
17338
+ pattern: /<[\s\S]+/,
17339
+ alias: 'class-name',
17340
+ inside: Prism.languages.cpp
17341
+ }
17342
+ }
17343
+ }
17344
+ });
17345
+ Prism.languages.insertBefore('cpp', 'operator', {
17346
+ 'double-colon': {
17347
+ pattern: /::/,
17348
+ alias: 'punctuation'
17349
+ }
17350
+ });
17351
+ Prism.languages.insertBefore('cpp', 'class-name', {
17352
+ // the base clause is an optional list of parent classes
17353
+ // https://en.cppreference.com/w/cpp/language/class
17354
+ 'base-clause': {
17355
+ pattern:
17356
+ /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
17357
+ lookbehind: true,
17358
+ greedy: true,
17359
+ inside: Prism.languages.extend('cpp', {})
17360
+ }
17361
+ });
17362
+ Prism.languages.insertBefore(
17363
+ 'inside',
17364
+ 'double-colon',
17365
+ {
17366
+ // All untokenized words that are not namespaces should be class names
17367
+ 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
17368
+ },
17369
+ Prism.languages.cpp['base-clause']
17370
+ );
17371
+ })(Prism);
17380
17372
  }
17381
17373
 
17382
- var refractorCpp$1 = requireCpp();
17374
+ var refractorCpp$1 = cpp_1;
17383
17375
  var arduino_1 = arduino;
17384
17376
  arduino.displayName = 'arduino';
17385
17377
  arduino.aliases = ['ino'];
@@ -17723,479 +17715,470 @@ function asmatmel(Prism) {
17723
17715
  };
17724
17716
  }
17725
17717
 
17726
- var csharp_1;
17727
- var hasRequiredCsharp;
17728
-
17729
- function requireCsharp () {
17730
- if (hasRequiredCsharp) return csharp_1;
17731
- hasRequiredCsharp = 1;
17732
-
17733
- csharp_1 = csharp;
17734
- csharp.displayName = 'csharp';
17735
- csharp.aliases = ['dotnet', 'cs'];
17736
- function csharp(Prism) {
17718
+ var csharp_1 = csharp;
17719
+ csharp.displayName = 'csharp';
17720
+ csharp.aliases = ['dotnet', 'cs'];
17721
+ function csharp(Prism) {
17737
17722
  (function (Prism) {
17738
- /**
17739
- * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
17740
- *
17741
- * Note: This is a simple text based replacement. Be careful when using backreferences!
17742
- *
17743
- * @param {string} pattern the given pattern.
17744
- * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
17745
- * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
17746
- * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
17747
- */
17748
- function replace(pattern, replacements) {
17749
- return pattern.replace(/<<(\d+)>>/g, function (m, index) {
17750
- return '(?:' + replacements[+index] + ')'
17751
- })
17752
- }
17753
- /**
17754
- * @param {string} pattern
17755
- * @param {string[]} replacements
17756
- * @param {string} [flags]
17757
- * @returns {RegExp}
17758
- */
17759
- function re(pattern, replacements, flags) {
17760
- return RegExp(replace(pattern, replacements), flags || '')
17761
- }
17762
- /**
17763
- * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
17764
- *
17765
- * @param {string} pattern
17766
- * @param {number} depthLog2
17767
- * @returns {string}
17768
- */
17769
- function nested(pattern, depthLog2) {
17770
- for (var i = 0; i < depthLog2; i++) {
17771
- pattern = pattern.replace(/<<self>>/g, function () {
17772
- return '(?:' + pattern + ')'
17773
- });
17774
- }
17775
- return pattern.replace(/<<self>>/g, '[^\\s\\S]')
17776
- } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
17777
- var keywordKinds = {
17778
- // keywords which represent a return or variable type
17779
- type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
17780
- // keywords which are used to declare a type
17781
- typeDeclaration: 'class enum interface record struct',
17782
- // contextual keywords
17783
- // ("var" and "dynamic" are missing because they are used like types)
17784
- contextual:
17785
- '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*{)',
17786
- // all other keywords
17787
- other:
17788
- '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'
17789
- }; // keywords
17790
- function keywordsToPattern(words) {
17791
- return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
17792
- }
17793
- var typeDeclarationKeywords = keywordsToPattern(
17794
- keywordKinds.typeDeclaration
17795
- );
17796
- var keywords = RegExp(
17797
- keywordsToPattern(
17798
- keywordKinds.type +
17799
- ' ' +
17800
- keywordKinds.typeDeclaration +
17801
- ' ' +
17802
- keywordKinds.contextual +
17803
- ' ' +
17804
- keywordKinds.other
17805
- )
17806
- );
17807
- var nonTypeKeywords = keywordsToPattern(
17808
- keywordKinds.typeDeclaration +
17809
- ' ' +
17810
- keywordKinds.contextual +
17811
- ' ' +
17812
- keywordKinds.other
17813
- );
17814
- var nonContextualKeywords = keywordsToPattern(
17815
- keywordKinds.type +
17816
- ' ' +
17817
- keywordKinds.typeDeclaration +
17818
- ' ' +
17819
- keywordKinds.other
17820
- ); // types
17821
- var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
17822
- var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
17823
- var name = /@?\b[A-Za-z_]\w*\b/.source;
17824
- var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
17825
- var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
17826
- nonTypeKeywords,
17827
- genericName
17828
- ]);
17829
- var array = /\[\s*(?:,\s*)*\]/.source;
17830
- var typeExpressionWithoutTuple = replace(
17831
- /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
17832
- [identifier, array]
17833
- );
17834
- var tupleElement = replace(
17835
- /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
17836
- [generic, nestedRound, array]
17837
- );
17838
- var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
17839
- var typeExpression = replace(
17840
- /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
17841
- [tuple, identifier, array]
17842
- );
17843
- var typeInside = {
17844
- keyword: keywords,
17845
- punctuation: /[<>()?,.:[\]]/
17846
- }; // strings & characters
17847
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
17848
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
17849
- var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
17850
- var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
17851
- var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
17852
- Prism.languages.csharp = Prism.languages.extend('clike', {
17853
- string: [
17854
- {
17855
- pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
17856
- lookbehind: true,
17857
- greedy: true
17858
- },
17859
- {
17860
- pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
17861
- lookbehind: true,
17862
- greedy: true
17863
- }
17864
- ],
17865
- 'class-name': [
17866
- {
17867
- // Using static
17868
- // using static System.Math;
17869
- pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
17870
- identifier
17871
- ]),
17872
- lookbehind: true,
17873
- inside: typeInside
17874
- },
17875
- {
17876
- // Using alias (type)
17877
- // using Project = PC.MyCompany.Project;
17878
- pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
17879
- name,
17880
- typeExpression
17881
- ]),
17882
- lookbehind: true,
17883
- inside: typeInside
17884
- },
17885
- {
17886
- // Using alias (alias)
17887
- // using Project = PC.MyCompany.Project;
17888
- pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
17889
- lookbehind: true
17890
- },
17891
- {
17892
- // Type declarations
17893
- // class Foo<A, B>
17894
- // interface Foo<out A, B>
17895
- pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
17896
- typeDeclarationKeywords,
17897
- genericName
17898
- ]),
17899
- lookbehind: true,
17900
- inside: typeInside
17901
- },
17902
- {
17903
- // Single catch exception declaration
17904
- // catch(Foo)
17905
- // (things like catch(Foo e) is covered by variable declaration)
17906
- pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
17907
- lookbehind: true,
17908
- inside: typeInside
17909
- },
17910
- {
17911
- // Name of the type parameter of generic constraints
17912
- // where Foo : class
17913
- pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
17914
- lookbehind: true
17915
- },
17916
- {
17917
- // Casts and checks via as and is.
17918
- // as Foo<A>, is Bar<B>
17919
- // (things like if(a is Foo b) is covered by variable declaration)
17920
- pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
17921
- typeExpressionWithoutTuple
17922
- ]),
17923
- lookbehind: true,
17924
- inside: typeInside
17925
- },
17926
- {
17927
- // Variable, field and parameter declaration
17928
- // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
17929
- pattern: re(
17930
- /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
17931
- .source,
17932
- [typeExpression, nonContextualKeywords, name]
17933
- ),
17934
- inside: typeInside
17935
- }
17936
- ],
17937
- keyword: keywords,
17938
- // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
17939
- number:
17940
- /(?:\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,
17941
- operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
17942
- punctuation: /\?\.?|::|[{}[\];(),.:]/
17943
- });
17944
- Prism.languages.insertBefore('csharp', 'number', {
17945
- range: {
17946
- pattern: /\.\./,
17947
- alias: 'operator'
17948
- }
17949
- });
17950
- Prism.languages.insertBefore('csharp', 'punctuation', {
17951
- 'named-parameter': {
17952
- pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
17953
- lookbehind: true,
17954
- alias: 'punctuation'
17955
- }
17956
- });
17957
- Prism.languages.insertBefore('csharp', 'class-name', {
17958
- namespace: {
17959
- // namespace Foo.Bar {}
17960
- // using Foo.Bar;
17961
- pattern: re(
17962
- /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
17963
- [name]
17964
- ),
17965
- lookbehind: true,
17966
- inside: {
17967
- punctuation: /\./
17968
- }
17969
- },
17970
- 'type-expression': {
17971
- // default(Foo), typeof(Foo<Bar>), sizeof(int)
17972
- pattern: re(
17973
- /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
17974
- .source,
17975
- [nestedRound]
17976
- ),
17977
- lookbehind: true,
17978
- alias: 'class-name',
17979
- inside: typeInside
17980
- },
17981
- 'return-type': {
17982
- // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
17983
- // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
17984
- // int Foo => 0; int Foo { get; set } = 0;
17985
- pattern: re(
17986
- /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
17987
- [typeExpression, identifier]
17988
- ),
17989
- inside: typeInside,
17990
- alias: 'class-name'
17991
- },
17992
- 'constructor-invocation': {
17993
- // new List<Foo<Bar[]>> { }
17994
- pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
17995
- lookbehind: true,
17996
- inside: typeInside,
17997
- alias: 'class-name'
17998
- },
17999
- /*'explicit-implementation': {
18000
- // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
18001
- pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
18002
- inside: classNameInside,
18003
- alias: 'class-name'
18004
- },*/
18005
- 'generic-method': {
18006
- // foo<Bar>()
18007
- pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
18008
- inside: {
18009
- function: re(/^<<0>>/.source, [name]),
18010
- generic: {
18011
- pattern: RegExp(generic),
18012
- alias: 'class-name',
18013
- inside: typeInside
18014
- }
18015
- }
18016
- },
18017
- 'type-list': {
18018
- // The list of types inherited or of generic constraints
18019
- // class Foo<F> : Bar, IList<FooBar>
18020
- // where F : Bar, IList<int>
18021
- pattern: re(
18022
- /\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|[{;]|=>|$))/
18023
- .source,
18024
- [
18025
- typeDeclarationKeywords,
18026
- genericName,
18027
- name,
18028
- typeExpression,
18029
- keywords.source,
18030
- nestedRound,
18031
- /\bnew\s*\(\s*\)/.source
18032
- ]
18033
- ),
18034
- lookbehind: true,
18035
- inside: {
18036
- 'record-arguments': {
18037
- pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
18038
- genericName,
18039
- nestedRound
18040
- ]),
18041
- lookbehind: true,
18042
- greedy: true,
18043
- inside: Prism.languages.csharp
18044
- },
18045
- keyword: keywords,
18046
- 'class-name': {
18047
- pattern: RegExp(typeExpression),
18048
- greedy: true,
18049
- inside: typeInside
18050
- },
18051
- punctuation: /[,()]/
18052
- }
18053
- },
18054
- preprocessor: {
18055
- pattern: /(^[\t ]*)#.*/m,
18056
- lookbehind: true,
18057
- alias: 'property',
18058
- inside: {
18059
- // highlight preprocessor directives as keywords
18060
- directive: {
18061
- pattern:
18062
- /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
18063
- lookbehind: true,
18064
- alias: 'keyword'
18065
- }
18066
- }
18067
- }
18068
- }); // attributes
18069
- var regularStringOrCharacter = regularString + '|' + character;
18070
- var regularStringCharacterOrComment = replace(
18071
- /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
18072
- [regularStringOrCharacter]
18073
- );
18074
- var roundExpression = nested(
18075
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18076
- regularStringCharacterOrComment
18077
- ]),
18078
- 2
18079
- ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
18080
- var attrTarget =
18081
- /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
18082
- .source;
18083
- var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
18084
- identifier,
18085
- roundExpression
18086
- ]);
18087
- Prism.languages.insertBefore('csharp', 'class-name', {
18088
- attribute: {
18089
- // Attributes
18090
- // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
18091
- pattern: re(
18092
- /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
18093
- .source,
18094
- [attrTarget, attr]
18095
- ),
18096
- lookbehind: true,
18097
- greedy: true,
18098
- inside: {
18099
- target: {
18100
- pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
18101
- alias: 'keyword'
18102
- },
18103
- 'attribute-arguments': {
18104
- pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
18105
- inside: Prism.languages.csharp
18106
- },
18107
- 'class-name': {
18108
- pattern: RegExp(identifier),
18109
- inside: {
18110
- punctuation: /\./
18111
- }
18112
- },
18113
- punctuation: /[:,]/
18114
- }
18115
- }
18116
- }); // string interpolation
18117
- var formatString = /:[^}\r\n]+/.source; // multi line
18118
- var mInterpolationRound = nested(
18119
- replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18120
- regularStringCharacterOrComment
18121
- ]),
18122
- 2
18123
- );
18124
- var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18125
- mInterpolationRound,
18126
- formatString
18127
- ]); // single line
18128
- var sInterpolationRound = nested(
18129
- replace(
18130
- /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
18131
- .source,
18132
- [regularStringOrCharacter]
18133
- ),
18134
- 2
18135
- );
18136
- var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18137
- sInterpolationRound,
18138
- formatString
18139
- ]);
18140
- function createInterpolationInside(interpolation, interpolationRound) {
18141
- return {
18142
- interpolation: {
18143
- pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
18144
- lookbehind: true,
18145
- inside: {
18146
- 'format-string': {
18147
- pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
18148
- interpolationRound,
18149
- formatString
18150
- ]),
18151
- lookbehind: true,
18152
- inside: {
18153
- punctuation: /^:/
18154
- }
18155
- },
18156
- punctuation: /^\{|\}$/,
18157
- expression: {
18158
- pattern: /[\s\S]+/,
18159
- alias: 'language-csharp',
18160
- inside: Prism.languages.csharp
18161
- }
18162
- }
18163
- },
18164
- string: /[\s\S]+/
18165
- }
18166
- }
18167
- Prism.languages.insertBefore('csharp', 'string', {
18168
- 'interpolation-string': [
18169
- {
18170
- pattern: re(
18171
- /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
18172
- [mInterpolation]
18173
- ),
18174
- lookbehind: true,
18175
- greedy: true,
18176
- inside: createInterpolationInside(mInterpolation, mInterpolationRound)
18177
- },
18178
- {
18179
- pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
18180
- sInterpolation
18181
- ]),
18182
- lookbehind: true,
18183
- greedy: true,
18184
- inside: createInterpolationInside(sInterpolation, sInterpolationRound)
18185
- }
18186
- ],
18187
- char: {
18188
- pattern: RegExp(character),
18189
- greedy: true
18190
- }
18191
- });
18192
- Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
18193
- })(Prism);
18194
- }
18195
- return csharp_1;
17723
+ /**
17724
+ * Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
17725
+ *
17726
+ * Note: This is a simple text based replacement. Be careful when using backreferences!
17727
+ *
17728
+ * @param {string} pattern the given pattern.
17729
+ * @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
17730
+ * @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
17731
+ * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
17732
+ */
17733
+ function replace(pattern, replacements) {
17734
+ return pattern.replace(/<<(\d+)>>/g, function (m, index) {
17735
+ return '(?:' + replacements[+index] + ')'
17736
+ })
17737
+ }
17738
+ /**
17739
+ * @param {string} pattern
17740
+ * @param {string[]} replacements
17741
+ * @param {string} [flags]
17742
+ * @returns {RegExp}
17743
+ */
17744
+ function re(pattern, replacements, flags) {
17745
+ return RegExp(replace(pattern, replacements), flags || '')
17746
+ }
17747
+ /**
17748
+ * Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
17749
+ *
17750
+ * @param {string} pattern
17751
+ * @param {number} depthLog2
17752
+ * @returns {string}
17753
+ */
17754
+ function nested(pattern, depthLog2) {
17755
+ for (var i = 0; i < depthLog2; i++) {
17756
+ pattern = pattern.replace(/<<self>>/g, function () {
17757
+ return '(?:' + pattern + ')'
17758
+ });
17759
+ }
17760
+ return pattern.replace(/<<self>>/g, '[^\\s\\S]')
17761
+ } // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/
17762
+ var keywordKinds = {
17763
+ // keywords which represent a return or variable type
17764
+ type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
17765
+ // keywords which are used to declare a type
17766
+ typeDeclaration: 'class enum interface record struct',
17767
+ // contextual keywords
17768
+ // ("var" and "dynamic" are missing because they are used like types)
17769
+ contextual:
17770
+ '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*{)',
17771
+ // all other keywords
17772
+ other:
17773
+ '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'
17774
+ }; // keywords
17775
+ function keywordsToPattern(words) {
17776
+ return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'
17777
+ }
17778
+ var typeDeclarationKeywords = keywordsToPattern(
17779
+ keywordKinds.typeDeclaration
17780
+ );
17781
+ var keywords = RegExp(
17782
+ keywordsToPattern(
17783
+ keywordKinds.type +
17784
+ ' ' +
17785
+ keywordKinds.typeDeclaration +
17786
+ ' ' +
17787
+ keywordKinds.contextual +
17788
+ ' ' +
17789
+ keywordKinds.other
17790
+ )
17791
+ );
17792
+ var nonTypeKeywords = keywordsToPattern(
17793
+ keywordKinds.typeDeclaration +
17794
+ ' ' +
17795
+ keywordKinds.contextual +
17796
+ ' ' +
17797
+ keywordKinds.other
17798
+ );
17799
+ var nonContextualKeywords = keywordsToPattern(
17800
+ keywordKinds.type +
17801
+ ' ' +
17802
+ keywordKinds.typeDeclaration +
17803
+ ' ' +
17804
+ keywordKinds.other
17805
+ ); // types
17806
+ var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement.
17807
+ var nestedRound = nested(/\((?:[^()]|<<self>>)*\)/.source, 2);
17808
+ var name = /@?\b[A-Za-z_]\w*\b/.source;
17809
+ var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]);
17810
+ var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [
17811
+ nonTypeKeywords,
17812
+ genericName
17813
+ ]);
17814
+ var array = /\[\s*(?:,\s*)*\]/.source;
17815
+ var typeExpressionWithoutTuple = replace(
17816
+ /<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,
17817
+ [identifier, array]
17818
+ );
17819
+ var tupleElement = replace(
17820
+ /[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,
17821
+ [generic, nestedRound, array]
17822
+ );
17823
+ var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]);
17824
+ var typeExpression = replace(
17825
+ /(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,
17826
+ [tuple, identifier, array]
17827
+ );
17828
+ var typeInside = {
17829
+ keyword: keywords,
17830
+ punctuation: /[<>()?,.:[\]]/
17831
+ }; // strings & characters
17832
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals
17833
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals
17834
+ var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern
17835
+ var regularString = /"(?:\\.|[^\\"\r\n])*"/.source;
17836
+ var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;
17837
+ Prism.languages.csharp = Prism.languages.extend('clike', {
17838
+ string: [
17839
+ {
17840
+ pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]),
17841
+ lookbehind: true,
17842
+ greedy: true
17843
+ },
17844
+ {
17845
+ pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]),
17846
+ lookbehind: true,
17847
+ greedy: true
17848
+ }
17849
+ ],
17850
+ 'class-name': [
17851
+ {
17852
+ // Using static
17853
+ // using static System.Math;
17854
+ pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [
17855
+ identifier
17856
+ ]),
17857
+ lookbehind: true,
17858
+ inside: typeInside
17859
+ },
17860
+ {
17861
+ // Using alias (type)
17862
+ // using Project = PC.MyCompany.Project;
17863
+ pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
17864
+ name,
17865
+ typeExpression
17866
+ ]),
17867
+ lookbehind: true,
17868
+ inside: typeInside
17869
+ },
17870
+ {
17871
+ // Using alias (alias)
17872
+ // using Project = PC.MyCompany.Project;
17873
+ pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]),
17874
+ lookbehind: true
17875
+ },
17876
+ {
17877
+ // Type declarations
17878
+ // class Foo<A, B>
17879
+ // interface Foo<out A, B>
17880
+ pattern: re(/(\b<<0>>\s+)<<1>>/.source, [
17881
+ typeDeclarationKeywords,
17882
+ genericName
17883
+ ]),
17884
+ lookbehind: true,
17885
+ inside: typeInside
17886
+ },
17887
+ {
17888
+ // Single catch exception declaration
17889
+ // catch(Foo)
17890
+ // (things like catch(Foo e) is covered by variable declaration)
17891
+ pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]),
17892
+ lookbehind: true,
17893
+ inside: typeInside
17894
+ },
17895
+ {
17896
+ // Name of the type parameter of generic constraints
17897
+ // where Foo : class
17898
+ pattern: re(/(\bwhere\s+)<<0>>/.source, [name]),
17899
+ lookbehind: true
17900
+ },
17901
+ {
17902
+ // Casts and checks via as and is.
17903
+ // as Foo<A>, is Bar<B>
17904
+ // (things like if(a is Foo b) is covered by variable declaration)
17905
+ pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [
17906
+ typeExpressionWithoutTuple
17907
+ ]),
17908
+ lookbehind: true,
17909
+ inside: typeInside
17910
+ },
17911
+ {
17912
+ // Variable, field and parameter declaration
17913
+ // (Foo bar, Bar baz, Foo[,,] bay, Foo<Bar, FooBar<Bar>> bax)
17914
+ pattern: re(
17915
+ /\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
17916
+ .source,
17917
+ [typeExpression, nonContextualKeywords, name]
17918
+ ),
17919
+ inside: typeInside
17920
+ }
17921
+ ],
17922
+ keyword: keywords,
17923
+ // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals
17924
+ number:
17925
+ /(?:\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,
17926
+ operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
17927
+ punctuation: /\?\.?|::|[{}[\];(),.:]/
17928
+ });
17929
+ Prism.languages.insertBefore('csharp', 'number', {
17930
+ range: {
17931
+ pattern: /\.\./,
17932
+ alias: 'operator'
17933
+ }
17934
+ });
17935
+ Prism.languages.insertBefore('csharp', 'punctuation', {
17936
+ 'named-parameter': {
17937
+ pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]),
17938
+ lookbehind: true,
17939
+ alias: 'punctuation'
17940
+ }
17941
+ });
17942
+ Prism.languages.insertBefore('csharp', 'class-name', {
17943
+ namespace: {
17944
+ // namespace Foo.Bar {}
17945
+ // using Foo.Bar;
17946
+ pattern: re(
17947
+ /(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,
17948
+ [name]
17949
+ ),
17950
+ lookbehind: true,
17951
+ inside: {
17952
+ punctuation: /\./
17953
+ }
17954
+ },
17955
+ 'type-expression': {
17956
+ // default(Foo), typeof(Foo<Bar>), sizeof(int)
17957
+ pattern: re(
17958
+ /(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
17959
+ .source,
17960
+ [nestedRound]
17961
+ ),
17962
+ lookbehind: true,
17963
+ alias: 'class-name',
17964
+ inside: typeInside
17965
+ },
17966
+ 'return-type': {
17967
+ // Foo<Bar> ForBar(); Foo IFoo.Bar() => 0
17968
+ // int this[int index] => 0; T IReadOnlyList<T>.this[int index] => this[index];
17969
+ // int Foo => 0; int Foo { get; set } = 0;
17970
+ pattern: re(
17971
+ /<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,
17972
+ [typeExpression, identifier]
17973
+ ),
17974
+ inside: typeInside,
17975
+ alias: 'class-name'
17976
+ },
17977
+ 'constructor-invocation': {
17978
+ // new List<Foo<Bar[]>> { }
17979
+ pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]),
17980
+ lookbehind: true,
17981
+ inside: typeInside,
17982
+ alias: 'class-name'
17983
+ },
17984
+ /*'explicit-implementation': {
17985
+ // int IFoo<Foo>.Bar => 0; void IFoo<Foo<Foo>>.Foo<T>();
17986
+ pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration),
17987
+ inside: classNameInside,
17988
+ alias: 'class-name'
17989
+ },*/
17990
+ 'generic-method': {
17991
+ // foo<Bar>()
17992
+ pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]),
17993
+ inside: {
17994
+ function: re(/^<<0>>/.source, [name]),
17995
+ generic: {
17996
+ pattern: RegExp(generic),
17997
+ alias: 'class-name',
17998
+ inside: typeInside
17999
+ }
18000
+ }
18001
+ },
18002
+ 'type-list': {
18003
+ // The list of types inherited or of generic constraints
18004
+ // class Foo<F> : Bar, IList<FooBar>
18005
+ // where F : Bar, IList<int>
18006
+ pattern: re(
18007
+ /\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|[{;]|=>|$))/
18008
+ .source,
18009
+ [
18010
+ typeDeclarationKeywords,
18011
+ genericName,
18012
+ name,
18013
+ typeExpression,
18014
+ keywords.source,
18015
+ nestedRound,
18016
+ /\bnew\s*\(\s*\)/.source
18017
+ ]
18018
+ ),
18019
+ lookbehind: true,
18020
+ inside: {
18021
+ 'record-arguments': {
18022
+ pattern: re(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [
18023
+ genericName,
18024
+ nestedRound
18025
+ ]),
18026
+ lookbehind: true,
18027
+ greedy: true,
18028
+ inside: Prism.languages.csharp
18029
+ },
18030
+ keyword: keywords,
18031
+ 'class-name': {
18032
+ pattern: RegExp(typeExpression),
18033
+ greedy: true,
18034
+ inside: typeInside
18035
+ },
18036
+ punctuation: /[,()]/
18037
+ }
18038
+ },
18039
+ preprocessor: {
18040
+ pattern: /(^[\t ]*)#.*/m,
18041
+ lookbehind: true,
18042
+ alias: 'property',
18043
+ inside: {
18044
+ // highlight preprocessor directives as keywords
18045
+ directive: {
18046
+ pattern:
18047
+ /(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
18048
+ lookbehind: true,
18049
+ alias: 'keyword'
18050
+ }
18051
+ }
18052
+ }
18053
+ }); // attributes
18054
+ var regularStringOrCharacter = regularString + '|' + character;
18055
+ var regularStringCharacterOrComment = replace(
18056
+ /\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,
18057
+ [regularStringOrCharacter]
18058
+ );
18059
+ var roundExpression = nested(
18060
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18061
+ regularStringCharacterOrComment
18062
+ ]),
18063
+ 2
18064
+ ); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets
18065
+ var attrTarget =
18066
+ /\b(?:assembly|event|field|method|module|param|property|return|type)\b/
18067
+ .source;
18068
+ var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [
18069
+ identifier,
18070
+ roundExpression
18071
+ ]);
18072
+ Prism.languages.insertBefore('csharp', 'class-name', {
18073
+ attribute: {
18074
+ // Attributes
18075
+ // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)]
18076
+ pattern: re(
18077
+ /((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
18078
+ .source,
18079
+ [attrTarget, attr]
18080
+ ),
18081
+ lookbehind: true,
18082
+ greedy: true,
18083
+ inside: {
18084
+ target: {
18085
+ pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]),
18086
+ alias: 'keyword'
18087
+ },
18088
+ 'attribute-arguments': {
18089
+ pattern: re(/\(<<0>>*\)/.source, [roundExpression]),
18090
+ inside: Prism.languages.csharp
18091
+ },
18092
+ 'class-name': {
18093
+ pattern: RegExp(identifier),
18094
+ inside: {
18095
+ punctuation: /\./
18096
+ }
18097
+ },
18098
+ punctuation: /[:,]/
18099
+ }
18100
+ }
18101
+ }); // string interpolation
18102
+ var formatString = /:[^}\r\n]+/.source; // multi line
18103
+ var mInterpolationRound = nested(
18104
+ replace(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [
18105
+ regularStringCharacterOrComment
18106
+ ]),
18107
+ 2
18108
+ );
18109
+ var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18110
+ mInterpolationRound,
18111
+ formatString
18112
+ ]); // single line
18113
+ var sInterpolationRound = nested(
18114
+ replace(
18115
+ /[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
18116
+ .source,
18117
+ [regularStringOrCharacter]
18118
+ ),
18119
+ 2
18120
+ );
18121
+ var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [
18122
+ sInterpolationRound,
18123
+ formatString
18124
+ ]);
18125
+ function createInterpolationInside(interpolation, interpolationRound) {
18126
+ return {
18127
+ interpolation: {
18128
+ pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]),
18129
+ lookbehind: true,
18130
+ inside: {
18131
+ 'format-string': {
18132
+ pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
18133
+ interpolationRound,
18134
+ formatString
18135
+ ]),
18136
+ lookbehind: true,
18137
+ inside: {
18138
+ punctuation: /^:/
18139
+ }
18140
+ },
18141
+ punctuation: /^\{|\}$/,
18142
+ expression: {
18143
+ pattern: /[\s\S]+/,
18144
+ alias: 'language-csharp',
18145
+ inside: Prism.languages.csharp
18146
+ }
18147
+ }
18148
+ },
18149
+ string: /[\s\S]+/
18150
+ }
18151
+ }
18152
+ Prism.languages.insertBefore('csharp', 'string', {
18153
+ 'interpolation-string': [
18154
+ {
18155
+ pattern: re(
18156
+ /(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,
18157
+ [mInterpolation]
18158
+ ),
18159
+ lookbehind: true,
18160
+ greedy: true,
18161
+ inside: createInterpolationInside(mInterpolation, mInterpolationRound)
18162
+ },
18163
+ {
18164
+ pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
18165
+ sInterpolation
18166
+ ]),
18167
+ lookbehind: true,
18168
+ greedy: true,
18169
+ inside: createInterpolationInside(sInterpolation, sInterpolationRound)
18170
+ }
18171
+ ],
18172
+ char: {
18173
+ pattern: RegExp(character),
18174
+ greedy: true
18175
+ }
18176
+ });
18177
+ Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
18178
+ })(Prism);
18196
18179
  }
18197
18180
 
18198
- var refractorCsharp = requireCsharp();
18181
+ var refractorCsharp = csharp_1;
18199
18182
  var aspnet_1 = aspnet;
18200
18183
  aspnet.displayName = 'aspnet';
18201
18184
  aspnet.aliases = [];
@@ -19389,7 +19372,7 @@ function cfscript(Prism) {
19389
19372
  Prism.languages.cfc = Prism.languages['cfscript'];
19390
19373
  }
19391
19374
 
19392
- var refractorCpp = requireCpp();
19375
+ var refractorCpp = cpp_1;
19393
19376
  var chaiscript_1 = chaiscript;
19394
19377
  chaiscript.displayName = 'chaiscript';
19395
19378
  chaiscript.aliases = [];
@@ -19456,31 +19439,40 @@ function chaiscript(Prism) {
19456
19439
  });
19457
19440
  }
19458
19441
 
19459
- var cil_1 = cil;
19460
- cil.displayName = 'cil';
19461
- cil.aliases = [];
19462
- function cil(Prism) {
19463
- Prism.languages.cil = {
19464
- comment: /\/\/.*/,
19465
- string: {
19466
- pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
19467
- greedy: true
19468
- },
19469
- directive: {
19470
- pattern: /(^|\W)\.[a-z]+(?=\s)/,
19471
- lookbehind: true,
19472
- alias: 'class-name'
19473
- },
19474
- // Actually an assembly reference
19475
- variable: /\[[\w\.]+\]/,
19476
- keyword:
19477
- /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
19478
- function:
19479
- /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,
19480
- boolean: /\b(?:false|true)\b/,
19481
- number: /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,
19482
- punctuation: /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
19483
- };
19442
+ var cil_1;
19443
+ var hasRequiredCil;
19444
+
19445
+ function requireCil () {
19446
+ if (hasRequiredCil) return cil_1;
19447
+ hasRequiredCil = 1;
19448
+
19449
+ cil_1 = cil;
19450
+ cil.displayName = 'cil';
19451
+ cil.aliases = [];
19452
+ function cil(Prism) {
19453
+ Prism.languages.cil = {
19454
+ comment: /\/\/.*/,
19455
+ string: {
19456
+ pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
19457
+ greedy: true
19458
+ },
19459
+ directive: {
19460
+ pattern: /(^|\W)\.[a-z]+(?=\s)/,
19461
+ lookbehind: true,
19462
+ alias: 'class-name'
19463
+ },
19464
+ // Actually an assembly reference
19465
+ variable: /\[[\w\.]+\]/,
19466
+ keyword:
19467
+ /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
19468
+ function:
19469
+ /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,
19470
+ boolean: /\b(?:false|true)\b/,
19471
+ number: /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,
19472
+ punctuation: /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
19473
+ };
19474
+ }
19475
+ return cil_1;
19484
19476
  }
19485
19477
 
19486
19478
  var clojure_1 = clojure;
@@ -19562,594 +19554,541 @@ function cmake(Prism) {
19562
19554
  };
19563
19555
  }
19564
19556
 
19565
- var cobol_1;
19566
- var hasRequiredCobol;
19567
-
19568
- function requireCobol () {
19569
- if (hasRequiredCobol) return cobol_1;
19570
- hasRequiredCobol = 1;
19571
-
19572
- cobol_1 = cobol;
19573
- cobol.displayName = 'cobol';
19574
- cobol.aliases = [];
19575
- function cobol(Prism) {
19576
- Prism.languages.cobol = {
19577
- comment: {
19578
- pattern: /\*>.*|(^[ \t]*)\*.*/m,
19579
- lookbehind: true,
19580
- greedy: true
19581
- },
19582
- string: {
19583
- pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
19584
- greedy: true
19585
- },
19586
- level: {
19587
- pattern: /(^[ \t]*)\d+\b/m,
19588
- lookbehind: true,
19589
- greedy: true,
19590
- alias: 'number'
19591
- },
19592
- 'class-name': {
19593
- // https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
19594
- pattern:
19595
- /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
19596
- lookbehind: true,
19597
- inside: {
19598
- number: {
19599
- pattern: /(\()\d+/,
19600
- lookbehind: true
19601
- },
19602
- punctuation: /[()]/
19603
- }
19604
- },
19605
- keyword: {
19606
- pattern:
19607
- /(^|[^\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,
19608
- lookbehind: true
19609
- },
19610
- boolean: {
19611
- pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
19612
- lookbehind: true
19613
- },
19614
- number: {
19615
- pattern:
19616
- /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
19617
- lookbehind: true
19618
- },
19619
- operator: [
19620
- /<>|[<>]=?|[=+*/&]/,
19621
- {
19622
- pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
19623
- lookbehind: true
19624
- }
19625
- ],
19626
- punctuation: /[.:,()]/
19627
- };
19628
- }
19629
- return cobol_1;
19557
+ var cobol_1 = cobol;
19558
+ cobol.displayName = 'cobol';
19559
+ cobol.aliases = [];
19560
+ function cobol(Prism) {
19561
+ Prism.languages.cobol = {
19562
+ comment: {
19563
+ pattern: /\*>.*|(^[ \t]*)\*.*/m,
19564
+ lookbehind: true,
19565
+ greedy: true
19566
+ },
19567
+ string: {
19568
+ pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
19569
+ greedy: true
19570
+ },
19571
+ level: {
19572
+ pattern: /(^[ \t]*)\d+\b/m,
19573
+ lookbehind: true,
19574
+ greedy: true,
19575
+ alias: 'number'
19576
+ },
19577
+ 'class-name': {
19578
+ // https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
19579
+ pattern:
19580
+ /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
19581
+ lookbehind: true,
19582
+ inside: {
19583
+ number: {
19584
+ pattern: /(\()\d+/,
19585
+ lookbehind: true
19586
+ },
19587
+ punctuation: /[()]/
19588
+ }
19589
+ },
19590
+ keyword: {
19591
+ pattern:
19592
+ /(^|[^\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,
19593
+ lookbehind: true
19594
+ },
19595
+ boolean: {
19596
+ pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
19597
+ lookbehind: true
19598
+ },
19599
+ number: {
19600
+ pattern:
19601
+ /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
19602
+ lookbehind: true
19603
+ },
19604
+ operator: [
19605
+ /<>|[<>]=?|[=+*/&]/,
19606
+ {
19607
+ pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
19608
+ lookbehind: true
19609
+ }
19610
+ ],
19611
+ punctuation: /[.:,()]/
19612
+ };
19630
19613
  }
19631
19614
 
19632
- var coffeescript_1;
19633
- var hasRequiredCoffeescript;
19634
-
19635
- function requireCoffeescript () {
19636
- if (hasRequiredCoffeescript) return coffeescript_1;
19637
- hasRequiredCoffeescript = 1;
19638
-
19639
- coffeescript_1 = coffeescript;
19640
- coffeescript.displayName = 'coffeescript';
19641
- coffeescript.aliases = ['coffee'];
19642
- function coffeescript(Prism) {
19615
+ var coffeescript_1 = coffeescript;
19616
+ coffeescript.displayName = 'coffeescript';
19617
+ coffeescript.aliases = ['coffee'];
19618
+ function coffeescript(Prism) {
19643
19619
  (function (Prism) {
19644
- // Ignore comments starting with { to privilege string interpolation highlighting
19645
- var comment = /#(?!\{).+/;
19646
- var interpolation = {
19647
- pattern: /#\{[^}]+\}/,
19648
- alias: 'variable'
19649
- };
19650
- Prism.languages.coffeescript = Prism.languages.extend('javascript', {
19651
- comment: comment,
19652
- string: [
19653
- // Strings are multiline
19654
- {
19655
- pattern: /'(?:\\[\s\S]|[^\\'])*'/,
19656
- greedy: true
19657
- },
19658
- {
19659
- // Strings are multiline
19660
- pattern: /"(?:\\[\s\S]|[^\\"])*"/,
19661
- greedy: true,
19662
- inside: {
19663
- interpolation: interpolation
19664
- }
19665
- }
19666
- ],
19667
- keyword:
19668
- /\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/,
19669
- 'class-member': {
19670
- pattern: /@(?!\d)\w+/,
19671
- alias: 'variable'
19672
- }
19673
- });
19674
- Prism.languages.insertBefore('coffeescript', 'comment', {
19675
- 'multiline-comment': {
19676
- pattern: /###[\s\S]+?###/,
19677
- alias: 'comment'
19678
- },
19679
- // Block regexp can contain comments and interpolation
19680
- 'block-regex': {
19681
- pattern: /\/{3}[\s\S]*?\/{3}/,
19682
- alias: 'regex',
19683
- inside: {
19684
- comment: comment,
19685
- interpolation: interpolation
19686
- }
19687
- }
19688
- });
19689
- Prism.languages.insertBefore('coffeescript', 'string', {
19690
- 'inline-javascript': {
19691
- pattern: /`(?:\\[\s\S]|[^\\`])*`/,
19692
- inside: {
19693
- delimiter: {
19694
- pattern: /^`|`$/,
19695
- alias: 'punctuation'
19696
- },
19697
- script: {
19698
- pattern: /[\s\S]+/,
19699
- alias: 'language-javascript',
19700
- inside: Prism.languages.javascript
19701
- }
19702
- }
19703
- },
19704
- // Block strings
19705
- 'multiline-string': [
19706
- {
19707
- pattern: /'''[\s\S]*?'''/,
19708
- greedy: true,
19709
- alias: 'string'
19710
- },
19711
- {
19712
- pattern: /"""[\s\S]*?"""/,
19713
- greedy: true,
19714
- alias: 'string',
19715
- inside: {
19716
- interpolation: interpolation
19717
- }
19718
- }
19719
- ]
19720
- });
19721
- Prism.languages.insertBefore('coffeescript', 'keyword', {
19722
- // Object property
19723
- property: /(?!\d)\w+(?=\s*:(?!:))/
19724
- });
19725
- delete Prism.languages.coffeescript['template-string'];
19726
- Prism.languages.coffee = Prism.languages.coffeescript;
19727
- })(Prism);
19728
- }
19729
- return coffeescript_1;
19620
+ // Ignore comments starting with { to privilege string interpolation highlighting
19621
+ var comment = /#(?!\{).+/;
19622
+ var interpolation = {
19623
+ pattern: /#\{[^}]+\}/,
19624
+ alias: 'variable'
19625
+ };
19626
+ Prism.languages.coffeescript = Prism.languages.extend('javascript', {
19627
+ comment: comment,
19628
+ string: [
19629
+ // Strings are multiline
19630
+ {
19631
+ pattern: /'(?:\\[\s\S]|[^\\'])*'/,
19632
+ greedy: true
19633
+ },
19634
+ {
19635
+ // Strings are multiline
19636
+ pattern: /"(?:\\[\s\S]|[^\\"])*"/,
19637
+ greedy: true,
19638
+ inside: {
19639
+ interpolation: interpolation
19640
+ }
19641
+ }
19642
+ ],
19643
+ keyword:
19644
+ /\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/,
19645
+ 'class-member': {
19646
+ pattern: /@(?!\d)\w+/,
19647
+ alias: 'variable'
19648
+ }
19649
+ });
19650
+ Prism.languages.insertBefore('coffeescript', 'comment', {
19651
+ 'multiline-comment': {
19652
+ pattern: /###[\s\S]+?###/,
19653
+ alias: 'comment'
19654
+ },
19655
+ // Block regexp can contain comments and interpolation
19656
+ 'block-regex': {
19657
+ pattern: /\/{3}[\s\S]*?\/{3}/,
19658
+ alias: 'regex',
19659
+ inside: {
19660
+ comment: comment,
19661
+ interpolation: interpolation
19662
+ }
19663
+ }
19664
+ });
19665
+ Prism.languages.insertBefore('coffeescript', 'string', {
19666
+ 'inline-javascript': {
19667
+ pattern: /`(?:\\[\s\S]|[^\\`])*`/,
19668
+ inside: {
19669
+ delimiter: {
19670
+ pattern: /^`|`$/,
19671
+ alias: 'punctuation'
19672
+ },
19673
+ script: {
19674
+ pattern: /[\s\S]+/,
19675
+ alias: 'language-javascript',
19676
+ inside: Prism.languages.javascript
19677
+ }
19678
+ }
19679
+ },
19680
+ // Block strings
19681
+ 'multiline-string': [
19682
+ {
19683
+ pattern: /'''[\s\S]*?'''/,
19684
+ greedy: true,
19685
+ alias: 'string'
19686
+ },
19687
+ {
19688
+ pattern: /"""[\s\S]*?"""/,
19689
+ greedy: true,
19690
+ alias: 'string',
19691
+ inside: {
19692
+ interpolation: interpolation
19693
+ }
19694
+ }
19695
+ ]
19696
+ });
19697
+ Prism.languages.insertBefore('coffeescript', 'keyword', {
19698
+ // Object property
19699
+ property: /(?!\d)\w+(?=\s*:(?!:))/
19700
+ });
19701
+ delete Prism.languages.coffeescript['template-string'];
19702
+ Prism.languages.coffee = Prism.languages.coffeescript;
19703
+ })(Prism);
19730
19704
  }
19731
19705
 
19732
- var concurnas_1;
19733
- var hasRequiredConcurnas;
19734
-
19735
- function requireConcurnas () {
19736
- if (hasRequiredConcurnas) return concurnas_1;
19737
- hasRequiredConcurnas = 1;
19738
-
19739
- concurnas_1 = concurnas;
19740
- concurnas.displayName = 'concurnas';
19741
- concurnas.aliases = ['conc'];
19742
- function concurnas(Prism) {
19743
- Prism.languages.concurnas = {
19744
- comment: {
19745
- pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
19746
- lookbehind: true,
19747
- greedy: true
19748
- },
19749
- langext: {
19750
- pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
19751
- greedy: true,
19752
- inside: {
19753
- 'class-name': /^\w+/,
19754
- string: {
19755
- pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
19756
- lookbehind: true
19757
- },
19758
- punctuation: /\|\|/
19759
- }
19760
- },
19761
- function: {
19762
- pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
19763
- lookbehind: true
19764
- },
19765
- keyword:
19766
- /\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/,
19767
- boolean: /\b(?:false|true)\b/,
19768
- number:
19769
- /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
19770
- punctuation: /[{}[\];(),.:]/,
19771
- operator:
19772
- /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
19773
- annotation: {
19774
- pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
19775
- alias: 'builtin'
19776
- }
19777
- };
19778
- Prism.languages.insertBefore('concurnas', 'langext', {
19779
- 'regex-literal': {
19780
- pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19781
- greedy: true,
19782
- inside: {
19783
- interpolation: {
19784
- pattern:
19785
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19786
- lookbehind: true,
19787
- inside: Prism.languages.concurnas
19788
- },
19789
- regex: /[\s\S]+/
19790
- }
19791
- },
19792
- 'string-literal': {
19793
- pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19794
- greedy: true,
19795
- inside: {
19796
- interpolation: {
19797
- pattern:
19798
- /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19799
- lookbehind: true,
19800
- inside: Prism.languages.concurnas
19801
- },
19802
- string: /[\s\S]+/
19803
- }
19804
- }
19805
- });
19806
- Prism.languages.conc = Prism.languages.concurnas;
19807
- }
19808
- return concurnas_1;
19706
+ var concurnas_1 = concurnas;
19707
+ concurnas.displayName = 'concurnas';
19708
+ concurnas.aliases = ['conc'];
19709
+ function concurnas(Prism) {
19710
+ Prism.languages.concurnas = {
19711
+ comment: {
19712
+ pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,
19713
+ lookbehind: true,
19714
+ greedy: true
19715
+ },
19716
+ langext: {
19717
+ pattern: /\b\w+\s*\|\|[\s\S]+?\|\|/,
19718
+ greedy: true,
19719
+ inside: {
19720
+ 'class-name': /^\w+/,
19721
+ string: {
19722
+ pattern: /(^\s*\|\|)[\s\S]+(?=\|\|$)/,
19723
+ lookbehind: true
19724
+ },
19725
+ punctuation: /\|\|/
19726
+ }
19727
+ },
19728
+ function: {
19729
+ pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
19730
+ lookbehind: true
19731
+ },
19732
+ keyword:
19733
+ /\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/,
19734
+ boolean: /\b(?:false|true)\b/,
19735
+ number:
19736
+ /\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
19737
+ punctuation: /[{}[\];(),.:]/,
19738
+ operator:
19739
+ /<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
19740
+ annotation: {
19741
+ pattern: /@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,
19742
+ alias: 'builtin'
19743
+ }
19744
+ };
19745
+ Prism.languages.insertBefore('concurnas', 'langext', {
19746
+ 'regex-literal': {
19747
+ pattern: /\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19748
+ greedy: true,
19749
+ inside: {
19750
+ interpolation: {
19751
+ pattern:
19752
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19753
+ lookbehind: true,
19754
+ inside: Prism.languages.concurnas
19755
+ },
19756
+ regex: /[\s\S]+/
19757
+ }
19758
+ },
19759
+ 'string-literal': {
19760
+ pattern: /(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
19761
+ greedy: true,
19762
+ inside: {
19763
+ interpolation: {
19764
+ pattern:
19765
+ /((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,
19766
+ lookbehind: true,
19767
+ inside: Prism.languages.concurnas
19768
+ },
19769
+ string: /[\s\S]+/
19770
+ }
19771
+ }
19772
+ });
19773
+ Prism.languages.conc = Prism.languages.concurnas;
19809
19774
  }
19810
19775
 
19811
- var coq_1;
19812
- var hasRequiredCoq;
19813
-
19814
- function requireCoq () {
19815
- if (hasRequiredCoq) return coq_1;
19816
- hasRequiredCoq = 1;
19817
-
19818
- coq_1 = coq;
19819
- coq.displayName = 'coq';
19820
- coq.aliases = [];
19821
- function coq(Prism) {
19776
+ var coq_1 = coq;
19777
+ coq.displayName = 'coq';
19778
+ coq.aliases = [];
19779
+ function coq(Prism) {
19822
19780
  (function (Prism) {
19823
- // https://github.com/coq/coq
19824
- var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
19825
- for (var i = 0; i < 2; i++) {
19826
- commentSource = commentSource.replace(/<self>/g, function () {
19827
- return commentSource
19828
- });
19829
- }
19830
- commentSource = commentSource.replace(/<self>/g, '[]');
19831
- Prism.languages.coq = {
19832
- comment: RegExp(commentSource),
19833
- string: {
19834
- pattern: /"(?:[^"]|"")*"(?!")/,
19835
- greedy: true
19836
- },
19837
- attribute: [
19838
- {
19839
- pattern: RegExp(
19840
- /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
19841
- /<comment>/g,
19842
- function () {
19843
- return commentSource
19844
- }
19845
- )
19846
- ),
19847
- greedy: true,
19848
- alias: 'attr-name',
19849
- inside: {
19850
- comment: RegExp(commentSource),
19851
- string: {
19852
- pattern: /"(?:[^"]|"")*"(?!")/,
19853
- greedy: true
19854
- },
19855
- operator: /=/,
19856
- punctuation: /^#\[|\]$|[,()]/
19857
- }
19858
- },
19859
- {
19860
- pattern:
19861
- /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
19862
- alias: 'attr-name'
19863
- }
19864
- ],
19865
- keyword:
19866
- /\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/,
19867
- number:
19868
- /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
19869
- punct: {
19870
- pattern: /@\{|\{\||\[=|:>/,
19871
- alias: 'punctuation'
19872
- },
19873
- operator:
19874
- /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
19875
- punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
19876
- };
19877
- })(Prism);
19878
- }
19879
- return coq_1;
19781
+ // https://github.com/coq/coq
19782
+ var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source;
19783
+ for (var i = 0; i < 2; i++) {
19784
+ commentSource = commentSource.replace(/<self>/g, function () {
19785
+ return commentSource
19786
+ });
19787
+ }
19788
+ commentSource = commentSource.replace(/<self>/g, '[]');
19789
+ Prism.languages.coq = {
19790
+ comment: RegExp(commentSource),
19791
+ string: {
19792
+ pattern: /"(?:[^"]|"")*"(?!")/,
19793
+ greedy: true
19794
+ },
19795
+ attribute: [
19796
+ {
19797
+ pattern: RegExp(
19798
+ /#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(
19799
+ /<comment>/g,
19800
+ function () {
19801
+ return commentSource
19802
+ }
19803
+ )
19804
+ ),
19805
+ greedy: true,
19806
+ alias: 'attr-name',
19807
+ inside: {
19808
+ comment: RegExp(commentSource),
19809
+ string: {
19810
+ pattern: /"(?:[^"]|"")*"(?!")/,
19811
+ greedy: true
19812
+ },
19813
+ operator: /=/,
19814
+ punctuation: /^#\[|\]$|[,()]/
19815
+ }
19816
+ },
19817
+ {
19818
+ pattern:
19819
+ /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,
19820
+ alias: 'attr-name'
19821
+ }
19822
+ ],
19823
+ keyword:
19824
+ /\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/,
19825
+ number:
19826
+ /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,
19827
+ punct: {
19828
+ pattern: /@\{|\{\||\[=|:>/,
19829
+ alias: 'punctuation'
19830
+ },
19831
+ operator:
19832
+ /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,
19833
+ punctuation: /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/
19834
+ };
19835
+ })(Prism);
19880
19836
  }
19881
19837
 
19882
- var ruby_1;
19883
- var hasRequiredRuby;
19884
-
19885
- function requireRuby () {
19886
- if (hasRequiredRuby) return ruby_1;
19887
- hasRequiredRuby = 1;
19888
-
19889
- ruby_1 = ruby;
19890
- ruby.displayName = 'ruby';
19891
- ruby.aliases = ['rb'];
19892
- function ruby(Prism) {
19838
+ var ruby_1 = ruby;
19839
+ ruby.displayName = 'ruby';
19840
+ ruby.aliases = ['rb'];
19841
+ function ruby(Prism) {
19893
19842
  (function (Prism) {
19894
- Prism.languages.ruby = Prism.languages.extend('clike', {
19895
- comment: {
19896
- pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
19897
- greedy: true
19898
- },
19899
- 'class-name': {
19900
- pattern:
19901
- /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
19902
- lookbehind: true,
19903
- inside: {
19904
- punctuation: /[.\\]/
19905
- }
19906
- },
19907
- keyword:
19908
- /\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/,
19909
- operator:
19910
- /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
19911
- punctuation: /[(){}[\].,;]/
19912
- });
19913
- Prism.languages.insertBefore('ruby', 'operator', {
19914
- 'double-colon': {
19915
- pattern: /::/,
19916
- alias: 'punctuation'
19917
- }
19918
- });
19919
- var interpolation = {
19920
- pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
19921
- lookbehind: true,
19922
- inside: {
19923
- content: {
19924
- pattern: /^(#\{)[\s\S]+(?=\}$)/,
19925
- lookbehind: true,
19926
- inside: Prism.languages.ruby
19927
- },
19928
- delimiter: {
19929
- pattern: /^#\{|\}$/,
19930
- alias: 'punctuation'
19931
- }
19932
- }
19933
- };
19934
- delete Prism.languages.ruby.function;
19935
- var percentExpression =
19936
- '(?:' +
19937
- [
19938
- /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
19939
- /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
19940
- /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
19941
- /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
19942
- /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
19943
- ].join('|') +
19944
- ')';
19945
- var symbolName =
19946
- /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
19947
- .source;
19948
- Prism.languages.insertBefore('ruby', 'keyword', {
19949
- 'regex-literal': [
19950
- {
19951
- pattern: RegExp(
19952
- /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
19953
- ),
19954
- greedy: true,
19955
- inside: {
19956
- interpolation: interpolation,
19957
- regex: /[\s\S]+/
19958
- }
19959
- },
19960
- {
19961
- pattern:
19962
- /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
19963
- lookbehind: true,
19964
- greedy: true,
19965
- inside: {
19966
- interpolation: interpolation,
19967
- regex: /[\s\S]+/
19968
- }
19969
- }
19970
- ],
19971
- variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
19972
- symbol: [
19973
- {
19974
- pattern: RegExp(/(^|[^:]):/.source + symbolName),
19975
- lookbehind: true,
19976
- greedy: true
19977
- },
19978
- {
19979
- pattern: RegExp(
19980
- /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
19981
- ),
19982
- lookbehind: true,
19983
- greedy: true
19984
- }
19985
- ],
19986
- 'method-definition': {
19987
- pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
19988
- lookbehind: true,
19989
- inside: {
19990
- function: /\b\w+$/,
19991
- keyword: /^self\b/,
19992
- 'class-name': /^\w+/,
19993
- punctuation: /\./
19994
- }
19995
- }
19996
- });
19997
- Prism.languages.insertBefore('ruby', 'string', {
19998
- 'string-literal': [
19999
- {
20000
- pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
20001
- greedy: true,
20002
- inside: {
20003
- interpolation: interpolation,
20004
- string: /[\s\S]+/
20005
- }
20006
- },
20007
- {
20008
- pattern:
20009
- /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
20010
- greedy: true,
20011
- inside: {
20012
- interpolation: interpolation,
20013
- string: /[\s\S]+/
20014
- }
20015
- },
20016
- {
20017
- pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
20018
- alias: 'heredoc-string',
20019
- greedy: true,
20020
- inside: {
20021
- delimiter: {
20022
- pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
20023
- inside: {
20024
- symbol: /\b\w+/,
20025
- punctuation: /^<<[-~]?/
20026
- }
20027
- },
20028
- interpolation: interpolation,
20029
- string: /[\s\S]+/
20030
- }
20031
- },
20032
- {
20033
- pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
20034
- alias: 'heredoc-string',
20035
- greedy: true,
20036
- inside: {
20037
- delimiter: {
20038
- pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
20039
- inside: {
20040
- symbol: /\b\w+/,
20041
- punctuation: /^<<[-~]?'|'$/
20042
- }
20043
- },
20044
- string: /[\s\S]+/
20045
- }
20046
- }
20047
- ],
20048
- 'command-literal': [
20049
- {
20050
- pattern: RegExp(/%x/.source + percentExpression),
20051
- greedy: true,
20052
- inside: {
20053
- interpolation: interpolation,
20054
- command: {
20055
- pattern: /[\s\S]+/,
20056
- alias: 'string'
20057
- }
20058
- }
20059
- },
20060
- {
20061
- pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
20062
- greedy: true,
20063
- inside: {
20064
- interpolation: interpolation,
20065
- command: {
20066
- pattern: /[\s\S]+/,
20067
- alias: 'string'
20068
- }
20069
- }
20070
- }
20071
- ]
20072
- });
20073
- delete Prism.languages.ruby.string;
20074
- Prism.languages.insertBefore('ruby', 'number', {
20075
- builtin:
20076
- /\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/,
20077
- constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
20078
- });
20079
- Prism.languages.rb = Prism.languages.ruby;
20080
- })(Prism);
20081
- }
20082
- return ruby_1;
19843
+ Prism.languages.ruby = Prism.languages.extend('clike', {
19844
+ comment: {
19845
+ pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
19846
+ greedy: true
19847
+ },
19848
+ 'class-name': {
19849
+ pattern:
19850
+ /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
19851
+ lookbehind: true,
19852
+ inside: {
19853
+ punctuation: /[.\\]/
19854
+ }
19855
+ },
19856
+ keyword:
19857
+ /\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/,
19858
+ operator:
19859
+ /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
19860
+ punctuation: /[(){}[\].,;]/
19861
+ });
19862
+ Prism.languages.insertBefore('ruby', 'operator', {
19863
+ 'double-colon': {
19864
+ pattern: /::/,
19865
+ alias: 'punctuation'
19866
+ }
19867
+ });
19868
+ var interpolation = {
19869
+ pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
19870
+ lookbehind: true,
19871
+ inside: {
19872
+ content: {
19873
+ pattern: /^(#\{)[\s\S]+(?=\}$)/,
19874
+ lookbehind: true,
19875
+ inside: Prism.languages.ruby
19876
+ },
19877
+ delimiter: {
19878
+ pattern: /^#\{|\}$/,
19879
+ alias: 'punctuation'
19880
+ }
19881
+ }
19882
+ };
19883
+ delete Prism.languages.ruby.function;
19884
+ var percentExpression =
19885
+ '(?:' +
19886
+ [
19887
+ /([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
19888
+ /\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
19889
+ /\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
19890
+ /\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
19891
+ /<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
19892
+ ].join('|') +
19893
+ ')';
19894
+ var symbolName =
19895
+ /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/
19896
+ .source;
19897
+ Prism.languages.insertBefore('ruby', 'keyword', {
19898
+ 'regex-literal': [
19899
+ {
19900
+ pattern: RegExp(
19901
+ /%r/.source + percentExpression + /[egimnosux]{0,6}/.source
19902
+ ),
19903
+ greedy: true,
19904
+ inside: {
19905
+ interpolation: interpolation,
19906
+ regex: /[\s\S]+/
19907
+ }
19908
+ },
19909
+ {
19910
+ pattern:
19911
+ /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
19912
+ lookbehind: true,
19913
+ greedy: true,
19914
+ inside: {
19915
+ interpolation: interpolation,
19916
+ regex: /[\s\S]+/
19917
+ }
19918
+ }
19919
+ ],
19920
+ variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
19921
+ symbol: [
19922
+ {
19923
+ pattern: RegExp(/(^|[^:]):/.source + symbolName),
19924
+ lookbehind: true,
19925
+ greedy: true
19926
+ },
19927
+ {
19928
+ pattern: RegExp(
19929
+ /([\r\n{(,][ \t]*)/.source + symbolName + /(?=:(?!:))/.source
19930
+ ),
19931
+ lookbehind: true,
19932
+ greedy: true
19933
+ }
19934
+ ],
19935
+ 'method-definition': {
19936
+ pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
19937
+ lookbehind: true,
19938
+ inside: {
19939
+ function: /\b\w+$/,
19940
+ keyword: /^self\b/,
19941
+ 'class-name': /^\w+/,
19942
+ punctuation: /\./
19943
+ }
19944
+ }
19945
+ });
19946
+ Prism.languages.insertBefore('ruby', 'string', {
19947
+ 'string-literal': [
19948
+ {
19949
+ pattern: RegExp(/%[qQiIwWs]?/.source + percentExpression),
19950
+ greedy: true,
19951
+ inside: {
19952
+ interpolation: interpolation,
19953
+ string: /[\s\S]+/
19954
+ }
19955
+ },
19956
+ {
19957
+ pattern:
19958
+ /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
19959
+ greedy: true,
19960
+ inside: {
19961
+ interpolation: interpolation,
19962
+ string: /[\s\S]+/
19963
+ }
19964
+ },
19965
+ {
19966
+ pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
19967
+ alias: 'heredoc-string',
19968
+ greedy: true,
19969
+ inside: {
19970
+ delimiter: {
19971
+ pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
19972
+ inside: {
19973
+ symbol: /\b\w+/,
19974
+ punctuation: /^<<[-~]?/
19975
+ }
19976
+ },
19977
+ interpolation: interpolation,
19978
+ string: /[\s\S]+/
19979
+ }
19980
+ },
19981
+ {
19982
+ pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
19983
+ alias: 'heredoc-string',
19984
+ greedy: true,
19985
+ inside: {
19986
+ delimiter: {
19987
+ pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
19988
+ inside: {
19989
+ symbol: /\b\w+/,
19990
+ punctuation: /^<<[-~]?'|'$/
19991
+ }
19992
+ },
19993
+ string: /[\s\S]+/
19994
+ }
19995
+ }
19996
+ ],
19997
+ 'command-literal': [
19998
+ {
19999
+ pattern: RegExp(/%x/.source + percentExpression),
20000
+ greedy: true,
20001
+ inside: {
20002
+ interpolation: interpolation,
20003
+ command: {
20004
+ pattern: /[\s\S]+/,
20005
+ alias: 'string'
20006
+ }
20007
+ }
20008
+ },
20009
+ {
20010
+ pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
20011
+ greedy: true,
20012
+ inside: {
20013
+ interpolation: interpolation,
20014
+ command: {
20015
+ pattern: /[\s\S]+/,
20016
+ alias: 'string'
20017
+ }
20018
+ }
20019
+ }
20020
+ ]
20021
+ });
20022
+ delete Prism.languages.ruby.string;
20023
+ Prism.languages.insertBefore('ruby', 'number', {
20024
+ builtin:
20025
+ /\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/,
20026
+ constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
20027
+ });
20028
+ Prism.languages.rb = Prism.languages.ruby;
20029
+ })(Prism);
20083
20030
  }
20084
20031
 
20085
- var crystal_1;
20086
- var hasRequiredCrystal;
20087
-
20088
- function requireCrystal () {
20089
- if (hasRequiredCrystal) return crystal_1;
20090
- hasRequiredCrystal = 1;
20091
- var refractorRuby = requireRuby();
20092
- crystal_1 = crystal;
20093
- crystal.displayName = 'crystal';
20094
- crystal.aliases = [];
20095
- function crystal(Prism) {
20096
- Prism.register(refractorRuby)
20097
- ;(function (Prism) {
20098
- Prism.languages.crystal = Prism.languages.extend('ruby', {
20099
- keyword: [
20100
- /\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/,
20101
- {
20102
- pattern: /(\.\s*)(?:is_a|responds_to)\?/,
20103
- lookbehind: true
20104
- }
20105
- ],
20106
- number:
20107
- /\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/,
20108
- operator: [/->/, Prism.languages.ruby.operator],
20109
- punctuation: /[(){}[\].,;\\]/
20110
- });
20111
- Prism.languages.insertBefore('crystal', 'string-literal', {
20112
- attribute: {
20113
- pattern: /@\[.*?\]/,
20114
- inside: {
20115
- delimiter: {
20116
- pattern: /^@\[|\]$/,
20117
- alias: 'punctuation'
20118
- },
20119
- attribute: {
20120
- pattern: /^(\s*)\w+/,
20121
- lookbehind: true,
20122
- alias: 'class-name'
20123
- },
20124
- args: {
20125
- pattern: /\S(?:[\s\S]*\S)?/,
20126
- inside: Prism.languages.crystal
20127
- }
20128
- }
20129
- },
20130
- expansion: {
20131
- pattern: /\{(?:\{.*?\}|%.*?%)\}/,
20132
- inside: {
20133
- content: {
20134
- pattern: /^(\{.)[\s\S]+(?=.\}$)/,
20135
- lookbehind: true,
20136
- inside: Prism.languages.crystal
20137
- },
20138
- delimiter: {
20139
- pattern: /^\{[\{%]|[\}%]\}$/,
20140
- alias: 'operator'
20141
- }
20142
- }
20143
- },
20144
- char: {
20145
- pattern:
20146
- /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
20147
- greedy: true
20148
- }
20149
- });
20150
- })(Prism);
20151
- }
20152
- return crystal_1;
20032
+ var refractorRuby = ruby_1;
20033
+ var crystal_1 = crystal;
20034
+ crystal.displayName = 'crystal';
20035
+ crystal.aliases = [];
20036
+ function crystal(Prism) {
20037
+ Prism.register(refractorRuby)
20038
+ ;(function (Prism) {
20039
+ Prism.languages.crystal = Prism.languages.extend('ruby', {
20040
+ keyword: [
20041
+ /\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/,
20042
+ {
20043
+ pattern: /(\.\s*)(?:is_a|responds_to)\?/,
20044
+ lookbehind: true
20045
+ }
20046
+ ],
20047
+ number:
20048
+ /\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/,
20049
+ operator: [/->/, Prism.languages.ruby.operator],
20050
+ punctuation: /[(){}[\].,;\\]/
20051
+ });
20052
+ Prism.languages.insertBefore('crystal', 'string-literal', {
20053
+ attribute: {
20054
+ pattern: /@\[.*?\]/,
20055
+ inside: {
20056
+ delimiter: {
20057
+ pattern: /^@\[|\]$/,
20058
+ alias: 'punctuation'
20059
+ },
20060
+ attribute: {
20061
+ pattern: /^(\s*)\w+/,
20062
+ lookbehind: true,
20063
+ alias: 'class-name'
20064
+ },
20065
+ args: {
20066
+ pattern: /\S(?:[\s\S]*\S)?/,
20067
+ inside: Prism.languages.crystal
20068
+ }
20069
+ }
20070
+ },
20071
+ expansion: {
20072
+ pattern: /\{(?:\{.*?\}|%.*?%)\}/,
20073
+ inside: {
20074
+ content: {
20075
+ pattern: /^(\{.)[\s\S]+(?=.\}$)/,
20076
+ lookbehind: true,
20077
+ inside: Prism.languages.crystal
20078
+ },
20079
+ delimiter: {
20080
+ pattern: /^\{[\{%]|[\}%]\}$/,
20081
+ alias: 'operator'
20082
+ }
20083
+ }
20084
+ },
20085
+ char: {
20086
+ pattern:
20087
+ /'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,
20088
+ greedy: true
20089
+ }
20090
+ });
20091
+ })(Prism);
20153
20092
  }
20154
20093
 
20155
20094
  var cshtml_1;
@@ -20158,7 +20097,7 @@ var hasRequiredCshtml;
20158
20097
  function requireCshtml () {
20159
20098
  if (hasRequiredCshtml) return cshtml_1;
20160
20099
  hasRequiredCshtml = 1;
20161
- var refractorCsharp = requireCsharp();
20100
+ var refractorCsharp = csharp_1;
20162
20101
  cshtml_1 = cshtml;
20163
20102
  cshtml.displayName = 'cshtml';
20164
20103
  cshtml.aliases = ['razor'];
@@ -21922,7 +21861,7 @@ var hasRequiredErb;
21922
21861
  function requireErb () {
21923
21862
  if (hasRequiredErb) return erb_1;
21924
21863
  hasRequiredErb = 1;
21925
- var refractorRuby = requireRuby();
21864
+ var refractorRuby = ruby_1;
21926
21865
  var refractorMarkupTemplating = requireMarkupTemplating();
21927
21866
  erb_1 = erb;
21928
21867
  erb.displayName = 'erb';
@@ -24404,7 +24343,7 @@ var hasRequiredHaml;
24404
24343
  function requireHaml () {
24405
24344
  if (hasRequiredHaml) return haml_1;
24406
24345
  hasRequiredHaml = 1;
24407
- var refractorRuby = requireRuby();
24346
+ var refractorRuby = ruby_1;
24408
24347
  haml_1 = haml;
24409
24348
  haml.displayName = 'haml';
24410
24349
  haml.aliases = [];
@@ -36840,7 +36779,7 @@ function requireT4Cs () {
36840
36779
  if (hasRequiredT4Cs) return t4Cs_1;
36841
36780
  hasRequiredT4Cs = 1;
36842
36781
  var refractorT4Templating = requireT4Templating();
36843
- var refractorCsharp = requireCsharp();
36782
+ var refractorCsharp = csharp_1;
36844
36783
  t4Cs_1 = t4Cs;
36845
36784
  t4Cs.displayName = 't4Cs';
36846
36785
  t4Cs.aliases = [];
@@ -39614,16 +39553,16 @@ refractor.register(bsl_1);
39614
39553
  refractor.register(c_1);
39615
39554
  refractor.register(cfscript_1);
39616
39555
  refractor.register(chaiscript_1);
39617
- refractor.register(cil_1);
39556
+ refractor.register(requireCil());
39618
39557
  refractor.register(clojure_1);
39619
39558
  refractor.register(cmake_1);
39620
- refractor.register(requireCobol());
39621
- refractor.register(requireCoffeescript());
39622
- refractor.register(requireConcurnas());
39623
- refractor.register(requireCoq());
39624
- refractor.register(requireCpp());
39625
- refractor.register(requireCrystal());
39626
- refractor.register(requireCsharp());
39559
+ refractor.register(cobol_1);
39560
+ refractor.register(coffeescript_1);
39561
+ refractor.register(concurnas_1);
39562
+ refractor.register(coq_1);
39563
+ refractor.register(cpp_1);
39564
+ refractor.register(crystal_1);
39565
+ refractor.register(csharp_1);
39627
39566
  refractor.register(requireCshtml());
39628
39567
  refractor.register(requireCsp());
39629
39568
  refractor.register(requireCssExtras());
@@ -39788,7 +39727,7 @@ refractor.register(requireRest());
39788
39727
  refractor.register(requireRip());
39789
39728
  refractor.register(requireRoboconf());
39790
39729
  refractor.register(requireRobotframework());
39791
- refractor.register(requireRuby());
39730
+ refractor.register(ruby_1);
39792
39731
  refractor.register(requireRust());
39793
39732
  refractor.register(requireSas());
39794
39733
  refractor.register(requireSass());
@@ -45937,7 +45876,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, propRef) {
45937
45876
  });
45938
45877
  Tooltip.propTypes = {
45939
45878
  variant: propTypes$1.exports.oneOf(['light', 'dark']),
45940
- content: propTypes$1.exports.string,
45879
+ content: propTypes$1.exports.node,
45941
45880
  position: propTypes$1.exports.oneOf(['right', 'top', 'bottom', 'left']),
45942
45881
  className: propTypes$1.exports.string
45943
45882
  };