react-ai-renderer 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5753,126 +5753,134 @@ function c(Prism) {
5753
5753
  delete Prism.languages.c['boolean'];
5754
5754
  }
5755
5755
 
5756
- var refractorC$1 = c_1;
5757
- var cpp_1 = cpp;
5758
- cpp.displayName = 'cpp';
5759
- cpp.aliases = [];
5760
- function cpp(Prism) {
5761
- Prism.register(refractorC$1)
5762
- ;(function (Prism) {
5763
- var keyword =
5764
- /\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/;
5765
- var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
5766
- /<keyword>/g,
5767
- function () {
5768
- return keyword.source
5769
- }
5770
- );
5771
- Prism.languages.cpp = Prism.languages.extend('c', {
5772
- 'class-name': [
5773
- {
5774
- pattern: RegExp(
5775
- /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
5776
- /<keyword>/g,
5777
- function () {
5778
- return keyword.source
5779
- }
5780
- )
5781
- ),
5782
- lookbehind: true
5783
- }, // This is intended to capture the class name of method implementations like:
5784
- // void foo::bar() const {}
5785
- // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
5786
- // it starts with an uppercase letter. This approximation should give decent results.
5787
- /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
5788
- // Foo::~Foo() {}
5789
- /\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
5790
- // parameters, so it can't be a namespace (until C++ adds generic namespaces).
5791
- /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
5792
- ],
5793
- keyword: keyword,
5794
- number: {
5795
- pattern:
5796
- /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
5797
- greedy: true
5798
- },
5799
- operator:
5800
- />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
5801
- boolean: /\b(?:false|true)\b/
5802
- });
5803
- Prism.languages.insertBefore('cpp', 'string', {
5804
- module: {
5805
- // https://en.cppreference.com/w/cpp/language/modules
5806
- pattern: RegExp(
5807
- /(\b(?:import|module)\s+)/.source +
5808
- '(?:' + // header-name
5809
- /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
5810
- '|' + // module name or partition or both
5811
- /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
5812
- /<mod-name>/g,
5813
- function () {
5814
- return modName
5815
- }
5816
- ) +
5817
- ')'
5818
- ),
5819
- lookbehind: true,
5820
- greedy: true,
5821
- inside: {
5822
- string: /^[<"][\s\S]+/,
5823
- operator: /:/,
5824
- punctuation: /\./
5825
- }
5826
- },
5827
- 'raw-string': {
5828
- pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
5829
- alias: 'string',
5830
- greedy: true
5831
- }
5832
- });
5833
- Prism.languages.insertBefore('cpp', 'keyword', {
5834
- 'generic-function': {
5835
- pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
5836
- inside: {
5837
- function: /^\w+/,
5838
- generic: {
5839
- pattern: /<[\s\S]+/,
5840
- alias: 'class-name',
5841
- inside: Prism.languages.cpp
5842
- }
5843
- }
5844
- }
5845
- });
5846
- Prism.languages.insertBefore('cpp', 'operator', {
5847
- 'double-colon': {
5848
- pattern: /::/,
5849
- alias: 'punctuation'
5850
- }
5851
- });
5852
- Prism.languages.insertBefore('cpp', 'class-name', {
5853
- // the base clause is an optional list of parent classes
5854
- // https://en.cppreference.com/w/cpp/language/class
5855
- 'base-clause': {
5856
- pattern:
5857
- /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
5858
- lookbehind: true,
5859
- greedy: true,
5860
- inside: Prism.languages.extend('cpp', {})
5861
- }
5862
- });
5863
- Prism.languages.insertBefore(
5864
- 'inside',
5865
- 'double-colon',
5866
- {
5867
- // All untokenized words that are not namespaces should be class names
5868
- 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
5869
- },
5870
- Prism.languages.cpp['base-clause']
5871
- );
5872
- })(Prism);
5756
+ var cpp_1;
5757
+ var hasRequiredCpp;
5758
+
5759
+ function requireCpp () {
5760
+ if (hasRequiredCpp) return cpp_1;
5761
+ hasRequiredCpp = 1;
5762
+ var refractorC = c_1;
5763
+ cpp_1 = cpp;
5764
+ cpp.displayName = 'cpp';
5765
+ cpp.aliases = [];
5766
+ function cpp(Prism) {
5767
+ Prism.register(refractorC)
5768
+ ;(function (Prism) {
5769
+ var keyword =
5770
+ /\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/;
5771
+ var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
5772
+ /<keyword>/g,
5773
+ function () {
5774
+ return keyword.source
5775
+ }
5776
+ );
5777
+ Prism.languages.cpp = Prism.languages.extend('c', {
5778
+ 'class-name': [
5779
+ {
5780
+ pattern: RegExp(
5781
+ /(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
5782
+ /<keyword>/g,
5783
+ function () {
5784
+ return keyword.source
5785
+ }
5786
+ )
5787
+ ),
5788
+ lookbehind: true
5789
+ }, // This is intended to capture the class name of method implementations like:
5790
+ // void foo::bar() const {}
5791
+ // However! The `foo` in the above example could also be a namespace, so we only capture the class name if
5792
+ // it starts with an uppercase letter. This approximation should give decent results.
5793
+ /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, // This will capture the class name before destructors like:
5794
+ // Foo::~Foo() {}
5795
+ /\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
5796
+ // parameters, so it can't be a namespace (until C++ adds generic namespaces).
5797
+ /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
5798
+ ],
5799
+ keyword: keyword,
5800
+ number: {
5801
+ pattern:
5802
+ /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
5803
+ greedy: true
5804
+ },
5805
+ operator:
5806
+ />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
5807
+ boolean: /\b(?:false|true)\b/
5808
+ });
5809
+ Prism.languages.insertBefore('cpp', 'string', {
5810
+ module: {
5811
+ // https://en.cppreference.com/w/cpp/language/modules
5812
+ pattern: RegExp(
5813
+ /(\b(?:import|module)\s+)/.source +
5814
+ '(?:' + // header-name
5815
+ /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
5816
+ '|' + // module name or partition or both
5817
+ /<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
5818
+ /<mod-name>/g,
5819
+ function () {
5820
+ return modName
5821
+ }
5822
+ ) +
5823
+ ')'
5824
+ ),
5825
+ lookbehind: true,
5826
+ greedy: true,
5827
+ inside: {
5828
+ string: /^[<"][\s\S]+/,
5829
+ operator: /:/,
5830
+ punctuation: /\./
5831
+ }
5832
+ },
5833
+ 'raw-string': {
5834
+ pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
5835
+ alias: 'string',
5836
+ greedy: true
5837
+ }
5838
+ });
5839
+ Prism.languages.insertBefore('cpp', 'keyword', {
5840
+ 'generic-function': {
5841
+ pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
5842
+ inside: {
5843
+ function: /^\w+/,
5844
+ generic: {
5845
+ pattern: /<[\s\S]+/,
5846
+ alias: 'class-name',
5847
+ inside: Prism.languages.cpp
5848
+ }
5849
+ }
5850
+ }
5851
+ });
5852
+ Prism.languages.insertBefore('cpp', 'operator', {
5853
+ 'double-colon': {
5854
+ pattern: /::/,
5855
+ alias: 'punctuation'
5856
+ }
5857
+ });
5858
+ Prism.languages.insertBefore('cpp', 'class-name', {
5859
+ // the base clause is an optional list of parent classes
5860
+ // https://en.cppreference.com/w/cpp/language/class
5861
+ 'base-clause': {
5862
+ pattern:
5863
+ /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
5864
+ lookbehind: true,
5865
+ greedy: true,
5866
+ inside: Prism.languages.extend('cpp', {})
5867
+ }
5868
+ });
5869
+ Prism.languages.insertBefore(
5870
+ 'inside',
5871
+ 'double-colon',
5872
+ {
5873
+ // All untokenized words that are not namespaces should be class names
5874
+ 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
5875
+ },
5876
+ Prism.languages.cpp['base-clause']
5877
+ );
5878
+ })(Prism);
5879
+ }
5880
+ return cpp_1;
5873
5881
  }
5874
5882
 
5875
- var refractorCpp$1 = cpp_1;
5883
+ var refractorCpp$1 = requireCpp();
5876
5884
  var arduino_1 = arduino;
5877
5885
  arduino.displayName = 'arduino';
5878
5886
  arduino.aliases = ['ino'];
@@ -7873,7 +7881,7 @@ function cfscript(Prism) {
7873
7881
  Prism.languages.cfc = Prism.languages['cfscript'];
7874
7882
  }
7875
7883
 
7876
- var refractorCpp = cpp_1;
7884
+ var refractorCpp = requireCpp();
7877
7885
  var chaiscript_1 = chaiscript;
7878
7886
  chaiscript.displayName = 'chaiscript';
7879
7887
  chaiscript.aliases = [];
@@ -8521,12 +8529,12 @@ function ruby(Prism) {
8521
8529
  })(Prism);
8522
8530
  }
8523
8531
 
8524
- var refractorRuby$1 = ruby_1;
8532
+ var refractorRuby = ruby_1;
8525
8533
  var crystal_1 = crystal;
8526
8534
  crystal.displayName = 'crystal';
8527
8535
  crystal.aliases = [];
8528
8536
  function crystal(Prism) {
8529
- Prism.register(refractorRuby$1)
8537
+ Prism.register(refractorRuby)
8530
8538
  ;(function (Prism) {
8531
8539
  Prism.languages.crystal = Prism.languages.extend('ruby', {
8532
8540
  keyword: [
@@ -8993,15 +9001,24 @@ function cssExtras(Prism) {
8993
9001
  })(Prism);
8994
9002
  }
8995
9003
 
8996
- var csv_1 = csv;
8997
- csv.displayName = 'csv';
8998
- csv.aliases = [];
8999
- function csv(Prism) {
9000
- // https://tools.ietf.org/html/rfc4180
9001
- Prism.languages.csv = {
9002
- value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
9003
- punctuation: /,/
9004
- };
9004
+ var csv_1;
9005
+ var hasRequiredCsv;
9006
+
9007
+ function requireCsv () {
9008
+ if (hasRequiredCsv) return csv_1;
9009
+ hasRequiredCsv = 1;
9010
+
9011
+ csv_1 = csv;
9012
+ csv.displayName = 'csv';
9013
+ csv.aliases = [];
9014
+ function csv(Prism) {
9015
+ // https://tools.ietf.org/html/rfc4180
9016
+ Prism.languages.csv = {
9017
+ value: /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,
9018
+ punctuation: /,/
9019
+ };
9020
+ }
9021
+ return csv_1;
9005
9022
  }
9006
9023
 
9007
9024
  var cypher_1 = cypher;
@@ -9573,12 +9590,12 @@ function requireMarkupTemplating () {
9573
9590
  return markupTemplating_1;
9574
9591
  }
9575
9592
 
9576
- var refractorMarkupTemplating$3 = requireMarkupTemplating();
9593
+ var refractorMarkupTemplating$1 = requireMarkupTemplating();
9577
9594
  var django_1 = django;
9578
9595
  django.displayName = 'django';
9579
9596
  django.aliases = ['jinja2'];
9580
9597
  function django(Prism) {
9581
- Prism.register(refractorMarkupTemplating$3)
9598
+ Prism.register(refractorMarkupTemplating$1)
9582
9599
  // Django/Jinja2 syntax definition for Prism.js <http://prismjs.com> syntax highlighter.
9583
9600
  // Mostly it works OK but can paint code incorrectly on complex html/template tag combinations.
9584
9601
  ;(function (Prism) {
@@ -9795,96 +9812,87 @@ function docker(Prism) {
9795
9812
  })(Prism);
9796
9813
  }
9797
9814
 
9798
- var dot_1;
9799
- var hasRequiredDot;
9800
-
9801
- function requireDot () {
9802
- if (hasRequiredDot) return dot_1;
9803
- hasRequiredDot = 1;
9804
-
9805
- dot_1 = dot;
9806
- dot.displayName = 'dot';
9807
- dot.aliases = ['gv'];
9808
- function dot(Prism) {
9815
+ var dot_1 = dot;
9816
+ dot.displayName = 'dot';
9817
+ dot.aliases = ['gv'];
9818
+ function dot(Prism) {
9809
9819
  (function (Prism) {
9810
- var ID =
9811
- '(?:' +
9812
- [
9813
- // an identifier
9814
- /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, // a number
9815
- /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, // a double-quoted string
9816
- /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, // HTML-like string
9817
- /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/
9818
- .source
9819
- ].join('|') +
9820
- ')';
9821
- var IDInside = {
9822
- markup: {
9823
- pattern: /(^<)[\s\S]+(?=>$)/,
9824
- lookbehind: true,
9825
- alias: ['language-markup', 'language-html', 'language-xml'],
9826
- inside: Prism.languages.markup
9827
- }
9828
- };
9829
- /**
9830
- * @param {string} source
9831
- * @param {string} flags
9832
- * @returns {RegExp}
9833
- */
9834
- function withID(source, flags) {
9835
- return RegExp(
9836
- source.replace(/<ID>/g, function () {
9837
- return ID
9838
- }),
9839
- flags
9840
- )
9841
- }
9842
- Prism.languages.dot = {
9843
- comment: {
9844
- pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
9845
- greedy: true
9846
- },
9847
- 'graph-name': {
9848
- pattern: withID(
9849
- /(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,
9850
- 'i'
9851
- ),
9852
- lookbehind: true,
9853
- greedy: true,
9854
- alias: 'class-name',
9855
- inside: IDInside
9856
- },
9857
- 'attr-value': {
9858
- pattern: withID(/(=[ \t\r\n]*)<ID>/.source),
9859
- lookbehind: true,
9860
- greedy: true,
9861
- inside: IDInside
9862
- },
9863
- 'attr-name': {
9864
- pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
9865
- lookbehind: true,
9866
- greedy: true,
9867
- inside: IDInside
9868
- },
9869
- keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
9870
- 'compass-point': {
9871
- pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
9872
- lookbehind: true,
9873
- alias: 'builtin'
9874
- },
9875
- node: {
9876
- pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
9877
- lookbehind: true,
9878
- greedy: true,
9879
- inside: IDInside
9880
- },
9881
- operator: /[=:]|-[->]/,
9882
- punctuation: /[\[\]{};,]/
9883
- };
9884
- Prism.languages.gv = Prism.languages.dot;
9885
- })(Prism);
9886
- }
9887
- return dot_1;
9820
+ var ID =
9821
+ '(?:' +
9822
+ [
9823
+ // an identifier
9824
+ /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, // a number
9825
+ /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, // a double-quoted string
9826
+ /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, // HTML-like string
9827
+ /<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/
9828
+ .source
9829
+ ].join('|') +
9830
+ ')';
9831
+ var IDInside = {
9832
+ markup: {
9833
+ pattern: /(^<)[\s\S]+(?=>$)/,
9834
+ lookbehind: true,
9835
+ alias: ['language-markup', 'language-html', 'language-xml'],
9836
+ inside: Prism.languages.markup
9837
+ }
9838
+ };
9839
+ /**
9840
+ * @param {string} source
9841
+ * @param {string} flags
9842
+ * @returns {RegExp}
9843
+ */
9844
+ function withID(source, flags) {
9845
+ return RegExp(
9846
+ source.replace(/<ID>/g, function () {
9847
+ return ID
9848
+ }),
9849
+ flags
9850
+ )
9851
+ }
9852
+ Prism.languages.dot = {
9853
+ comment: {
9854
+ pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,
9855
+ greedy: true
9856
+ },
9857
+ 'graph-name': {
9858
+ pattern: withID(
9859
+ /(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,
9860
+ 'i'
9861
+ ),
9862
+ lookbehind: true,
9863
+ greedy: true,
9864
+ alias: 'class-name',
9865
+ inside: IDInside
9866
+ },
9867
+ 'attr-value': {
9868
+ pattern: withID(/(=[ \t\r\n]*)<ID>/.source),
9869
+ lookbehind: true,
9870
+ greedy: true,
9871
+ inside: IDInside
9872
+ },
9873
+ 'attr-name': {
9874
+ pattern: withID(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),
9875
+ lookbehind: true,
9876
+ greedy: true,
9877
+ inside: IDInside
9878
+ },
9879
+ keyword: /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,
9880
+ 'compass-point': {
9881
+ pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,
9882
+ lookbehind: true,
9883
+ alias: 'builtin'
9884
+ },
9885
+ node: {
9886
+ pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),
9887
+ lookbehind: true,
9888
+ greedy: true,
9889
+ inside: IDInside
9890
+ },
9891
+ operator: /[=:]|-[->]/,
9892
+ punctuation: /[\[\]{};,]/
9893
+ };
9894
+ Prism.languages.gv = Prism.languages.dot;
9895
+ })(Prism);
9888
9896
  }
9889
9897
 
9890
9898
  var ebnf_1;
@@ -9922,83 +9930,101 @@ function requireEbnf () {
9922
9930
  return ebnf_1;
9923
9931
  }
9924
9932
 
9925
- var editorconfig_1 = editorconfig;
9926
- editorconfig.displayName = 'editorconfig';
9927
- editorconfig.aliases = [];
9928
- function editorconfig(Prism) {
9929
- Prism.languages.editorconfig = {
9930
- // https://editorconfig-specification.readthedocs.io
9931
- comment: /[;#].*/,
9932
- section: {
9933
- pattern: /(^[ \t]*)\[.+\]/m,
9934
- lookbehind: true,
9935
- alias: 'selector',
9936
- inside: {
9937
- regex: /\\\\[\[\]{},!?.*]/,
9938
- // Escape special characters with '\\'
9939
- operator: /[!?]|\.\.|\*{1,2}/,
9940
- punctuation: /[\[\]{},]/
9941
- }
9942
- },
9943
- key: {
9944
- pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
9945
- lookbehind: true,
9946
- alias: 'attr-name'
9947
- },
9948
- value: {
9949
- pattern: /=.*/,
9950
- alias: 'attr-value',
9951
- inside: {
9952
- punctuation: /^=/
9953
- }
9954
- }
9955
- };
9956
- }
9933
+ var editorconfig_1;
9934
+ var hasRequiredEditorconfig;
9957
9935
 
9958
- var eiffel_1 = eiffel;
9959
- eiffel.displayName = 'eiffel';
9960
- eiffel.aliases = [];
9961
- function eiffel(Prism) {
9962
- Prism.languages.eiffel = {
9963
- comment: /--.*/,
9964
- string: [
9965
- // Aligned-verbatim-strings
9966
- {
9967
- pattern: /"([^[]*)\[[\s\S]*?\]\1"/,
9968
- greedy: true
9969
- }, // Non-aligned-verbatim-strings
9970
- {
9971
- pattern: /"([^{]*)\{[\s\S]*?\}\1"/,
9972
- greedy: true
9973
- }, // Single-line string
9974
- {
9975
- pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,
9976
- greedy: true
9977
- }
9978
- ],
9979
- // normal char | special char | char code
9980
- char: /'(?:%.|[^%'\r\n])+'/,
9981
- keyword:
9982
- /\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
9983
- boolean: /\b(?:False|True)\b/i,
9984
- // Convention: class-names are always all upper-case characters
9985
- 'class-name': /\b[A-Z][\dA-Z_]*\b/,
9986
- number: [
9987
- // hexa | octal | bin
9988
- /\b0[xcb][\da-f](?:_*[\da-f])*\b/i, // Decimal
9989
- /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i
9990
- ],
9991
- punctuation: /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
9992
- operator: /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
9993
- };
9936
+ function requireEditorconfig () {
9937
+ if (hasRequiredEditorconfig) return editorconfig_1;
9938
+ hasRequiredEditorconfig = 1;
9939
+
9940
+ editorconfig_1 = editorconfig;
9941
+ editorconfig.displayName = 'editorconfig';
9942
+ editorconfig.aliases = [];
9943
+ function editorconfig(Prism) {
9944
+ Prism.languages.editorconfig = {
9945
+ // https://editorconfig-specification.readthedocs.io
9946
+ comment: /[;#].*/,
9947
+ section: {
9948
+ pattern: /(^[ \t]*)\[.+\]/m,
9949
+ lookbehind: true,
9950
+ alias: 'selector',
9951
+ inside: {
9952
+ regex: /\\\\[\[\]{},!?.*]/,
9953
+ // Escape special characters with '\\'
9954
+ operator: /[!?]|\.\.|\*{1,2}/,
9955
+ punctuation: /[\[\]{},]/
9956
+ }
9957
+ },
9958
+ key: {
9959
+ pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
9960
+ lookbehind: true,
9961
+ alias: 'attr-name'
9962
+ },
9963
+ value: {
9964
+ pattern: /=.*/,
9965
+ alias: 'attr-value',
9966
+ inside: {
9967
+ punctuation: /^=/
9968
+ }
9969
+ }
9970
+ };
9971
+ }
9972
+ return editorconfig_1;
9994
9973
  }
9995
9974
 
9996
- var refractorMarkupTemplating$2 = requireMarkupTemplating();
9997
- var ejs_1 = ejs;
9998
- ejs.displayName = 'ejs';
9975
+ var eiffel_1;
9976
+ var hasRequiredEiffel;
9977
+
9978
+ function requireEiffel () {
9979
+ if (hasRequiredEiffel) return eiffel_1;
9980
+ hasRequiredEiffel = 1;
9981
+
9982
+ eiffel_1 = eiffel;
9983
+ eiffel.displayName = 'eiffel';
9984
+ eiffel.aliases = [];
9985
+ function eiffel(Prism) {
9986
+ Prism.languages.eiffel = {
9987
+ comment: /--.*/,
9988
+ string: [
9989
+ // Aligned-verbatim-strings
9990
+ {
9991
+ pattern: /"([^[]*)\[[\s\S]*?\]\1"/,
9992
+ greedy: true
9993
+ }, // Non-aligned-verbatim-strings
9994
+ {
9995
+ pattern: /"([^{]*)\{[\s\S]*?\}\1"/,
9996
+ greedy: true
9997
+ }, // Single-line string
9998
+ {
9999
+ pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,
10000
+ greedy: true
10001
+ }
10002
+ ],
10003
+ // normal char | special char | char code
10004
+ char: /'(?:%.|[^%'\r\n])+'/,
10005
+ keyword:
10006
+ /\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,
10007
+ boolean: /\b(?:False|True)\b/i,
10008
+ // Convention: class-names are always all upper-case characters
10009
+ 'class-name': /\b[A-Z][\dA-Z_]*\b/,
10010
+ number: [
10011
+ // hexa | octal | bin
10012
+ /\b0[xcb][\da-f](?:_*[\da-f])*\b/i, // Decimal
10013
+ /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i
10014
+ ],
10015
+ punctuation: /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,
10016
+ operator: /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/
10017
+ };
10018
+ }
10019
+ return eiffel_1;
10020
+ }
10021
+
10022
+ var refractorMarkupTemplating = requireMarkupTemplating();
10023
+ var ejs_1 = ejs;
10024
+ ejs.displayName = 'ejs';
9999
10025
  ejs.aliases = ['eta'];
10000
10026
  function ejs(Prism) {
10001
- Prism.register(refractorMarkupTemplating$2)
10027
+ Prism.register(refractorMarkupTemplating)
10002
10028
  ;(function (Prism) {
10003
10029
  Prism.languages.ejs = {
10004
10030
  delimiter: {
@@ -10026,1561 +10052,1676 @@ function ejs(Prism) {
10026
10052
  })(Prism);
10027
10053
  }
10028
10054
 
10029
- var elixir_1 = elixir;
10030
- elixir.displayName = 'elixir';
10031
- elixir.aliases = [];
10032
- function elixir(Prism) {
10033
- Prism.languages.elixir = {
10034
- doc: {
10035
- pattern:
10036
- /@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,
10037
- inside: {
10038
- attribute: /^@\w+/,
10039
- string: /['"][\s\S]+/
10040
- }
10041
- },
10042
- comment: {
10043
- pattern: /#.*/,
10044
- greedy: true
10045
- },
10046
- // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r<foo>
10047
- regex: {
10048
- pattern:
10049
- /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,
10050
- greedy: true
10051
- },
10052
- string: [
10053
- {
10054
- // ~s"""foo""" (multi-line), ~s'''foo''' (multi-line), ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo} (with interpolation care), ~s<foo>
10055
- pattern:
10056
- /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,
10057
- greedy: true,
10058
- inside: {
10059
- // See interpolation below
10060
- }
10061
- },
10062
- {
10063
- pattern: /("""|''')[\s\S]*?\1/,
10064
- greedy: true,
10065
- inside: {
10066
- // See interpolation below
10067
- }
10068
- },
10069
- {
10070
- // Multi-line strings are allowed
10071
- pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
10072
- greedy: true,
10073
- inside: {
10074
- // See interpolation below
10075
- }
10076
- }
10077
- ],
10078
- atom: {
10079
- // Look-behind prevents bad highlighting of the :: operator
10080
- pattern: /(^|[^:]):\w+/,
10081
- lookbehind: true,
10082
- alias: 'symbol'
10083
- },
10084
- module: {
10085
- pattern: /\b[A-Z]\w*\b/,
10086
- alias: 'class-name'
10087
- },
10088
- // Look-ahead prevents bad highlighting of the :: operator
10089
- 'attr-name': /\b\w+\??:(?!:)/,
10090
- argument: {
10091
- // Look-behind prevents bad highlighting of the && operator
10092
- pattern: /(^|[^&])&\d+/,
10093
- lookbehind: true,
10094
- alias: 'variable'
10095
- },
10096
- attribute: {
10097
- pattern: /@\w+/,
10098
- alias: 'variable'
10099
- },
10100
- function: /\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,
10101
- number: /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,
10102
- keyword:
10103
- /\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,
10104
- boolean: /\b(?:false|nil|true)\b/,
10105
- operator: [
10106
- /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,
10107
- {
10108
- // We don't want to match <<
10109
- pattern: /([^<])<(?!<)/,
10110
- lookbehind: true
10111
- },
10112
- {
10113
- // We don't want to match >>
10114
- pattern: /([^>])>(?!>)/,
10115
- lookbehind: true
10116
- }
10117
- ],
10118
- punctuation: /<<|>>|[.,%\[\]{}()]/
10119
- };
10120
- Prism.languages.elixir.string.forEach(function (o) {
10121
- o.inside = {
10122
- interpolation: {
10123
- pattern: /#\{[^}]+\}/,
10124
- inside: {
10125
- delimiter: {
10126
- pattern: /^#\{|\}$/,
10127
- alias: 'punctuation'
10128
- },
10129
- rest: Prism.languages.elixir
10130
- }
10131
- }
10132
- };
10133
- });
10134
- }
10055
+ var elixir_1;
10056
+ var hasRequiredElixir;
10135
10057
 
10136
- var elm_1 = elm;
10137
- elm.displayName = 'elm';
10138
- elm.aliases = [];
10139
- function elm(Prism) {
10140
- Prism.languages.elm = {
10141
- comment: /--.*|\{-[\s\S]*?-\}/,
10142
- char: {
10143
- pattern:
10144
- /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,
10145
- greedy: true
10146
- },
10147
- string: [
10148
- {
10149
- // Multiline strings are wrapped in triple ". Quotes may appear unescaped.
10150
- pattern: /"""[\s\S]*?"""/,
10151
- greedy: true
10152
- },
10153
- {
10154
- pattern: /"(?:[^\\"\r\n]|\\.)*"/,
10155
- greedy: true
10156
- }
10157
- ],
10158
- 'import-statement': {
10159
- // The imported or hidden names are not included in this import
10160
- // statement. This is because we want to highlight those exactly like
10161
- // we do for the names in the program.
10162
- pattern:
10163
- /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,
10164
- lookbehind: true,
10165
- inside: {
10166
- keyword: /\b(?:as|exposing|import)\b/
10167
- }
10168
- },
10169
- keyword:
10170
- /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,
10171
- // These are builtin variables only. Constructors are highlighted later as a constant.
10172
- builtin:
10173
- /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,
10174
- // decimal integers and floating point numbers | hexadecimal integers
10175
- number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,
10176
- // Most of this is needed because of the meaning of a single '.'.
10177
- // If it stands alone freely, it is the function composition.
10178
- // It may also be a separator between a module name and an identifier => no
10179
- // operator. If it comes together with other special characters it is an
10180
- // operator too.
10181
- // Valid operator characters in 0.18: +-/*=.$<>:&|^?%#@~!
10182
- // Ref: https://groups.google.com/forum/#!msg/elm-dev/0AHSnDdkSkQ/E0SVU70JEQAJ
10183
- operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,
10184
- // In Elm, nearly everything is a variable, do not highlight these.
10185
- hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,
10186
- constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,
10187
- punctuation: /[{}[\]|(),.:]/
10188
- };
10189
- }
10058
+ function requireElixir () {
10059
+ if (hasRequiredElixir) return elixir_1;
10060
+ hasRequiredElixir = 1;
10190
10061
 
10191
- var refractorRuby = ruby_1;
10192
- var refractorMarkupTemplating$1 = requireMarkupTemplating();
10193
- var erb_1 = erb;
10194
- erb.displayName = 'erb';
10195
- erb.aliases = [];
10196
- function erb(Prism) {
10197
- Prism.register(refractorRuby);
10198
- Prism.register(refractorMarkupTemplating$1)
10199
- ;(function (Prism) {
10200
- Prism.languages.erb = {
10201
- delimiter: {
10202
- pattern: /^(\s*)<%=?|%>(?=\s*$)/,
10203
- lookbehind: true,
10204
- alias: 'punctuation'
10205
- },
10206
- ruby: {
10207
- pattern: /\s*\S[\s\S]*/,
10208
- alias: 'language-ruby',
10209
- inside: Prism.languages.ruby
10210
- }
10211
- };
10212
- Prism.hooks.add('before-tokenize', function (env) {
10213
- var erbPattern =
10214
- /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g;
10215
- Prism.languages['markup-templating'].buildPlaceholders(
10216
- env,
10217
- 'erb',
10218
- erbPattern
10219
- );
10220
- });
10221
- Prism.hooks.add('after-tokenize', function (env) {
10222
- Prism.languages['markup-templating'].tokenizePlaceholders(env, 'erb');
10223
- });
10224
- })(Prism);
10062
+ elixir_1 = elixir;
10063
+ elixir.displayName = 'elixir';
10064
+ elixir.aliases = [];
10065
+ function elixir(Prism) {
10066
+ Prism.languages.elixir = {
10067
+ doc: {
10068
+ pattern:
10069
+ /@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,
10070
+ inside: {
10071
+ attribute: /^@\w+/,
10072
+ string: /['"][\s\S]+/
10073
+ }
10074
+ },
10075
+ comment: {
10076
+ pattern: /#.*/,
10077
+ greedy: true
10078
+ },
10079
+ // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r<foo>
10080
+ regex: {
10081
+ pattern:
10082
+ /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,
10083
+ greedy: true
10084
+ },
10085
+ string: [
10086
+ {
10087
+ // ~s"""foo""" (multi-line), ~s'''foo''' (multi-line), ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo} (with interpolation care), ~s<foo>
10088
+ pattern:
10089
+ /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,
10090
+ greedy: true,
10091
+ inside: {
10092
+ // See interpolation below
10093
+ }
10094
+ },
10095
+ {
10096
+ pattern: /("""|''')[\s\S]*?\1/,
10097
+ greedy: true,
10098
+ inside: {
10099
+ // See interpolation below
10100
+ }
10101
+ },
10102
+ {
10103
+ // Multi-line strings are allowed
10104
+ pattern: /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
10105
+ greedy: true,
10106
+ inside: {
10107
+ // See interpolation below
10108
+ }
10109
+ }
10110
+ ],
10111
+ atom: {
10112
+ // Look-behind prevents bad highlighting of the :: operator
10113
+ pattern: /(^|[^:]):\w+/,
10114
+ lookbehind: true,
10115
+ alias: 'symbol'
10116
+ },
10117
+ module: {
10118
+ pattern: /\b[A-Z]\w*\b/,
10119
+ alias: 'class-name'
10120
+ },
10121
+ // Look-ahead prevents bad highlighting of the :: operator
10122
+ 'attr-name': /\b\w+\??:(?!:)/,
10123
+ argument: {
10124
+ // Look-behind prevents bad highlighting of the && operator
10125
+ pattern: /(^|[^&])&\d+/,
10126
+ lookbehind: true,
10127
+ alias: 'variable'
10128
+ },
10129
+ attribute: {
10130
+ pattern: /@\w+/,
10131
+ alias: 'variable'
10132
+ },
10133
+ function: /\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,
10134
+ number: /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,
10135
+ keyword:
10136
+ /\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,
10137
+ boolean: /\b(?:false|nil|true)\b/,
10138
+ operator: [
10139
+ /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,
10140
+ {
10141
+ // We don't want to match <<
10142
+ pattern: /([^<])<(?!<)/,
10143
+ lookbehind: true
10144
+ },
10145
+ {
10146
+ // We don't want to match >>
10147
+ pattern: /([^>])>(?!>)/,
10148
+ lookbehind: true
10149
+ }
10150
+ ],
10151
+ punctuation: /<<|>>|[.,%\[\]{}()]/
10152
+ };
10153
+ Prism.languages.elixir.string.forEach(function (o) {
10154
+ o.inside = {
10155
+ interpolation: {
10156
+ pattern: /#\{[^}]+\}/,
10157
+ inside: {
10158
+ delimiter: {
10159
+ pattern: /^#\{|\}$/,
10160
+ alias: 'punctuation'
10161
+ },
10162
+ rest: Prism.languages.elixir
10163
+ }
10164
+ }
10165
+ };
10166
+ });
10167
+ }
10168
+ return elixir_1;
10225
10169
  }
10226
10170
 
10227
- var erlang_1 = erlang;
10228
- erlang.displayName = 'erlang';
10229
- erlang.aliases = [];
10230
- function erlang(Prism) {
10231
- Prism.languages.erlang = {
10232
- comment: /%.+/,
10233
- string: {
10234
- pattern: /"(?:\\.|[^\\"\r\n])*"/,
10235
- greedy: true
10236
- },
10237
- 'quoted-function': {
10238
- pattern: /'(?:\\.|[^\\'\r\n])+'(?=\()/,
10239
- alias: 'function'
10240
- },
10241
- 'quoted-atom': {
10242
- pattern: /'(?:\\.|[^\\'\r\n])+'/,
10243
- alias: 'atom'
10244
- },
10245
- boolean: /\b(?:false|true)\b/,
10246
- keyword: /\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,
10247
- number: [
10248
- /\$\\?./,
10249
- /\b\d+#[a-z0-9]+/i,
10250
- /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i
10251
- ],
10252
- function: /\b[a-z][\w@]*(?=\()/,
10253
- variable: {
10254
- // Look-behind is used to prevent wrong highlighting of atoms containing "@"
10255
- pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
10256
- lookbehind: true
10257
- },
10258
- operator: [
10259
- /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,
10260
- {
10261
- // We don't want to match <<
10262
- pattern: /(^|[^<])<(?!<)/,
10263
- lookbehind: true
10264
- },
10265
- {
10266
- // We don't want to match >>
10267
- pattern: /(^|[^>])>(?!>)/,
10268
- lookbehind: true
10269
- }
10270
- ],
10271
- atom: /\b[a-z][\w@]*/,
10272
- punctuation: /[()[\]{}:;,.#|]|<<|>>/
10273
- };
10274
- }
10171
+ var elm_1;
10172
+ var hasRequiredElm;
10275
10173
 
10276
- var lua_1 = lua;
10277
- lua.displayName = 'lua';
10278
- lua.aliases = [];
10279
- function lua(Prism) {
10280
- Prism.languages.lua = {
10281
- comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
10282
- // \z may be used to skip the following space
10283
- string: {
10284
- pattern:
10285
- /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
10286
- greedy: true
10287
- },
10288
- number:
10289
- /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,
10290
- keyword:
10291
- /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,
10292
- function: /(?!\d)\w+(?=\s*(?:[({]))/,
10293
- operator: [
10294
- /[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,
10295
- {
10296
- // Match ".." but don't break "..."
10297
- pattern: /(^|[^.])\.\.(?!\.)/,
10298
- lookbehind: true
10299
- }
10300
- ],
10301
- punctuation: /[\[\](){},;]|\.+|:+/
10302
- };
10174
+ function requireElm () {
10175
+ if (hasRequiredElm) return elm_1;
10176
+ hasRequiredElm = 1;
10177
+
10178
+ elm_1 = elm;
10179
+ elm.displayName = 'elm';
10180
+ elm.aliases = [];
10181
+ function elm(Prism) {
10182
+ Prism.languages.elm = {
10183
+ comment: /--.*|\{-[\s\S]*?-\}/,
10184
+ char: {
10185
+ pattern:
10186
+ /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,
10187
+ greedy: true
10188
+ },
10189
+ string: [
10190
+ {
10191
+ // Multiline strings are wrapped in triple ". Quotes may appear unescaped.
10192
+ pattern: /"""[\s\S]*?"""/,
10193
+ greedy: true
10194
+ },
10195
+ {
10196
+ pattern: /"(?:[^\\"\r\n]|\\.)*"/,
10197
+ greedy: true
10198
+ }
10199
+ ],
10200
+ 'import-statement': {
10201
+ // The imported or hidden names are not included in this import
10202
+ // statement. This is because we want to highlight those exactly like
10203
+ // we do for the names in the program.
10204
+ pattern:
10205
+ /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,
10206
+ lookbehind: true,
10207
+ inside: {
10208
+ keyword: /\b(?:as|exposing|import)\b/
10209
+ }
10210
+ },
10211
+ keyword:
10212
+ /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,
10213
+ // These are builtin variables only. Constructors are highlighted later as a constant.
10214
+ builtin:
10215
+ /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,
10216
+ // decimal integers and floating point numbers | hexadecimal integers
10217
+ number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,
10218
+ // Most of this is needed because of the meaning of a single '.'.
10219
+ // If it stands alone freely, it is the function composition.
10220
+ // It may also be a separator between a module name and an identifier => no
10221
+ // operator. If it comes together with other special characters it is an
10222
+ // operator too.
10223
+ // Valid operator characters in 0.18: +-/*=.$<>:&|^?%#@~!
10224
+ // Ref: https://groups.google.com/forum/#!msg/elm-dev/0AHSnDdkSkQ/E0SVU70JEQAJ
10225
+ operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,
10226
+ // In Elm, nearly everything is a variable, do not highlight these.
10227
+ hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,
10228
+ constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,
10229
+ punctuation: /[{}[\]|(),.:]/
10230
+ };
10231
+ }
10232
+ return elm_1;
10303
10233
  }
10304
10234
 
10305
- var refractorLua = lua_1;
10306
- var refractorMarkupTemplating = requireMarkupTemplating();
10307
- var etlua_1 = etlua;
10308
- etlua.displayName = 'etlua';
10309
- etlua.aliases = [];
10310
- function etlua(Prism) {
10311
- Prism.register(refractorLua);
10312
- Prism.register(refractorMarkupTemplating)
10313
- ;(function (Prism) {
10314
- Prism.languages.etlua = {
10315
- delimiter: {
10316
- pattern: /^<%[-=]?|-?%>$/,
10317
- alias: 'punctuation'
10318
- },
10319
- 'language-lua': {
10320
- pattern: /[\s\S]+/,
10321
- inside: Prism.languages.lua
10322
- }
10323
- };
10324
- Prism.hooks.add('before-tokenize', function (env) {
10325
- var pattern = /<%[\s\S]+?%>/g;
10326
- Prism.languages['markup-templating'].buildPlaceholders(
10327
- env,
10328
- 'etlua',
10329
- pattern
10330
- );
10331
- });
10332
- Prism.hooks.add('after-tokenize', function (env) {
10333
- Prism.languages['markup-templating'].tokenizePlaceholders(env, 'etlua');
10334
- });
10335
- })(Prism);
10235
+ var erb_1;
10236
+ var hasRequiredErb;
10237
+
10238
+ function requireErb () {
10239
+ if (hasRequiredErb) return erb_1;
10240
+ hasRequiredErb = 1;
10241
+ var refractorRuby = ruby_1;
10242
+ var refractorMarkupTemplating = requireMarkupTemplating();
10243
+ erb_1 = erb;
10244
+ erb.displayName = 'erb';
10245
+ erb.aliases = [];
10246
+ function erb(Prism) {
10247
+ Prism.register(refractorRuby);
10248
+ Prism.register(refractorMarkupTemplating)
10249
+ ;(function (Prism) {
10250
+ Prism.languages.erb = {
10251
+ delimiter: {
10252
+ pattern: /^(\s*)<%=?|%>(?=\s*$)/,
10253
+ lookbehind: true,
10254
+ alias: 'punctuation'
10255
+ },
10256
+ ruby: {
10257
+ pattern: /\s*\S[\s\S]*/,
10258
+ alias: 'language-ruby',
10259
+ inside: Prism.languages.ruby
10260
+ }
10261
+ };
10262
+ Prism.hooks.add('before-tokenize', function (env) {
10263
+ var erbPattern =
10264
+ /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g;
10265
+ Prism.languages['markup-templating'].buildPlaceholders(
10266
+ env,
10267
+ 'erb',
10268
+ erbPattern
10269
+ );
10270
+ });
10271
+ Prism.hooks.add('after-tokenize', function (env) {
10272
+ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'erb');
10273
+ });
10274
+ })(Prism);
10275
+ }
10276
+ return erb_1;
10336
10277
  }
10337
10278
 
10338
- var excelFormula_1 = excelFormula;
10339
- excelFormula.displayName = 'excelFormula';
10340
- excelFormula.aliases = [];
10341
- function excelFormula(Prism) {
10342
- Prism.languages['excel-formula'] = {
10343
- comment: {
10344
- pattern: /(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,
10345
- lookbehind: true,
10346
- greedy: true
10347
- },
10348
- string: {
10349
- pattern: /"(?:[^"]|"")*"(?!")/,
10350
- greedy: true
10351
- },
10352
- reference: {
10353
- // https://www.ablebits.com/office-addins-blog/2015/12/08/excel-reference-another-sheet-workbook/
10354
- // Sales!B2
10355
- // 'Winter sales'!B2
10356
- // [Sales.xlsx]Jan!B2:B5
10357
- // D:\Reports\[Sales.xlsx]Jan!B2:B5
10358
- // '[Sales.xlsx]Jan sales'!B2:B5
10359
- // 'D:\Reports\[Sales.xlsx]Jan sales'!B2:B5
10360
- pattern:
10361
- /(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,
10362
- greedy: true,
10363
- alias: 'string',
10364
- inside: {
10365
- operator: /!$/,
10366
- punctuation: /'/,
10367
- sheet: {
10368
- pattern: /[^[\]]+$/,
10369
- alias: 'function'
10370
- },
10371
- file: {
10372
- pattern: /\[[^[\]]+\]$/,
10373
- inside: {
10374
- punctuation: /[[\]]/
10375
- }
10376
- },
10377
- path: /[\s\S]+/
10378
- }
10379
- },
10380
- 'function-name': {
10381
- pattern: /\b[A-Z]\w*(?=\()/i,
10382
- alias: 'keyword'
10383
- },
10384
- range: {
10385
- pattern:
10386
- /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,
10387
- alias: 'property',
10388
- inside: {
10389
- operator: /:/,
10390
- cell: /\$?[A-Z]+\$?\d+/i,
10391
- column: /\$?[A-Z]+/i,
10392
- row: /\$?\d+/
10393
- }
10394
- },
10395
- cell: {
10396
- // Excel is case insensitive, so the string "foo1" could be either a variable or a cell.
10397
- // To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise.
10398
- pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,
10399
- alias: 'property'
10400
- },
10401
- number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
10402
- boolean: /\b(?:FALSE|TRUE)\b/i,
10403
- operator: /[-+*/^%=&,]|<[=>]?|>=?/,
10404
- punctuation: /[[\]();{}|]/
10405
- };
10406
- Prism.languages['xlsx'] = Prism.languages['xls'] =
10407
- Prism.languages['excel-formula'];
10279
+ var erlang_1;
10280
+ var hasRequiredErlang;
10281
+
10282
+ function requireErlang () {
10283
+ if (hasRequiredErlang) return erlang_1;
10284
+ hasRequiredErlang = 1;
10285
+
10286
+ erlang_1 = erlang;
10287
+ erlang.displayName = 'erlang';
10288
+ erlang.aliases = [];
10289
+ function erlang(Prism) {
10290
+ Prism.languages.erlang = {
10291
+ comment: /%.+/,
10292
+ string: {
10293
+ pattern: /"(?:\\.|[^\\"\r\n])*"/,
10294
+ greedy: true
10295
+ },
10296
+ 'quoted-function': {
10297
+ pattern: /'(?:\\.|[^\\'\r\n])+'(?=\()/,
10298
+ alias: 'function'
10299
+ },
10300
+ 'quoted-atom': {
10301
+ pattern: /'(?:\\.|[^\\'\r\n])+'/,
10302
+ alias: 'atom'
10303
+ },
10304
+ boolean: /\b(?:false|true)\b/,
10305
+ keyword: /\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,
10306
+ number: [
10307
+ /\$\\?./,
10308
+ /\b\d+#[a-z0-9]+/i,
10309
+ /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i
10310
+ ],
10311
+ function: /\b[a-z][\w@]*(?=\()/,
10312
+ variable: {
10313
+ // Look-behind is used to prevent wrong highlighting of atoms containing "@"
10314
+ pattern: /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,
10315
+ lookbehind: true
10316
+ },
10317
+ operator: [
10318
+ /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,
10319
+ {
10320
+ // We don't want to match <<
10321
+ pattern: /(^|[^<])<(?!<)/,
10322
+ lookbehind: true
10323
+ },
10324
+ {
10325
+ // We don't want to match >>
10326
+ pattern: /(^|[^>])>(?!>)/,
10327
+ lookbehind: true
10328
+ }
10329
+ ],
10330
+ atom: /\b[a-z][\w@]*/,
10331
+ punctuation: /[()[\]{}:;,.#|]|<<|>>/
10332
+ };
10333
+ }
10334
+ return erlang_1;
10335
+ }
10336
+
10337
+ var lua_1;
10338
+ var hasRequiredLua;
10339
+
10340
+ function requireLua () {
10341
+ if (hasRequiredLua) return lua_1;
10342
+ hasRequiredLua = 1;
10343
+
10344
+ lua_1 = lua;
10345
+ lua.displayName = 'lua';
10346
+ lua.aliases = [];
10347
+ function lua(Prism) {
10348
+ Prism.languages.lua = {
10349
+ comment: /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
10350
+ // \z may be used to skip the following space
10351
+ string: {
10352
+ pattern:
10353
+ /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
10354
+ greedy: true
10355
+ },
10356
+ number:
10357
+ /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,
10358
+ keyword:
10359
+ /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,
10360
+ function: /(?!\d)\w+(?=\s*(?:[({]))/,
10361
+ operator: [
10362
+ /[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,
10363
+ {
10364
+ // Match ".." but don't break "..."
10365
+ pattern: /(^|[^.])\.\.(?!\.)/,
10366
+ lookbehind: true
10367
+ }
10368
+ ],
10369
+ punctuation: /[\[\](){},;]|\.+|:+/
10370
+ };
10371
+ }
10372
+ return lua_1;
10408
10373
  }
10409
10374
 
10410
- var factor_1 = factor;
10411
- factor.displayName = 'factor';
10412
- factor.aliases = [];
10413
- function factor(Prism) {
10375
+ var etlua_1;
10376
+ var hasRequiredEtlua;
10377
+
10378
+ function requireEtlua () {
10379
+ if (hasRequiredEtlua) return etlua_1;
10380
+ hasRequiredEtlua = 1;
10381
+ var refractorLua = requireLua();
10382
+ var refractorMarkupTemplating = requireMarkupTemplating();
10383
+ etlua_1 = etlua;
10384
+ etlua.displayName = 'etlua';
10385
+ etlua.aliases = [];
10386
+ function etlua(Prism) {
10387
+ Prism.register(refractorLua);
10388
+ Prism.register(refractorMarkupTemplating)
10389
+ ;(function (Prism) {
10390
+ Prism.languages.etlua = {
10391
+ delimiter: {
10392
+ pattern: /^<%[-=]?|-?%>$/,
10393
+ alias: 'punctuation'
10394
+ },
10395
+ 'language-lua': {
10396
+ pattern: /[\s\S]+/,
10397
+ inside: Prism.languages.lua
10398
+ }
10399
+ };
10400
+ Prism.hooks.add('before-tokenize', function (env) {
10401
+ var pattern = /<%[\s\S]+?%>/g;
10402
+ Prism.languages['markup-templating'].buildPlaceholders(
10403
+ env,
10404
+ 'etlua',
10405
+ pattern
10406
+ );
10407
+ });
10408
+ Prism.hooks.add('after-tokenize', function (env) {
10409
+ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'etlua');
10410
+ });
10411
+ })(Prism);
10412
+ }
10413
+ return etlua_1;
10414
+ }
10415
+
10416
+ var excelFormula_1;
10417
+ var hasRequiredExcelFormula;
10418
+
10419
+ function requireExcelFormula () {
10420
+ if (hasRequiredExcelFormula) return excelFormula_1;
10421
+ hasRequiredExcelFormula = 1;
10422
+
10423
+ excelFormula_1 = excelFormula;
10424
+ excelFormula.displayName = 'excelFormula';
10425
+ excelFormula.aliases = [];
10426
+ function excelFormula(Prism) {
10427
+ Prism.languages['excel-formula'] = {
10428
+ comment: {
10429
+ pattern: /(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,
10430
+ lookbehind: true,
10431
+ greedy: true
10432
+ },
10433
+ string: {
10434
+ pattern: /"(?:[^"]|"")*"(?!")/,
10435
+ greedy: true
10436
+ },
10437
+ reference: {
10438
+ // https://www.ablebits.com/office-addins-blog/2015/12/08/excel-reference-another-sheet-workbook/
10439
+ // Sales!B2
10440
+ // 'Winter sales'!B2
10441
+ // [Sales.xlsx]Jan!B2:B5
10442
+ // D:\Reports\[Sales.xlsx]Jan!B2:B5
10443
+ // '[Sales.xlsx]Jan sales'!B2:B5
10444
+ // 'D:\Reports\[Sales.xlsx]Jan sales'!B2:B5
10445
+ pattern:
10446
+ /(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,
10447
+ greedy: true,
10448
+ alias: 'string',
10449
+ inside: {
10450
+ operator: /!$/,
10451
+ punctuation: /'/,
10452
+ sheet: {
10453
+ pattern: /[^[\]]+$/,
10454
+ alias: 'function'
10455
+ },
10456
+ file: {
10457
+ pattern: /\[[^[\]]+\]$/,
10458
+ inside: {
10459
+ punctuation: /[[\]]/
10460
+ }
10461
+ },
10462
+ path: /[\s\S]+/
10463
+ }
10464
+ },
10465
+ 'function-name': {
10466
+ pattern: /\b[A-Z]\w*(?=\()/i,
10467
+ alias: 'keyword'
10468
+ },
10469
+ range: {
10470
+ pattern:
10471
+ /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,
10472
+ alias: 'property',
10473
+ inside: {
10474
+ operator: /:/,
10475
+ cell: /\$?[A-Z]+\$?\d+/i,
10476
+ column: /\$?[A-Z]+/i,
10477
+ row: /\$?\d+/
10478
+ }
10479
+ },
10480
+ cell: {
10481
+ // Excel is case insensitive, so the string "foo1" could be either a variable or a cell.
10482
+ // To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise.
10483
+ pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,
10484
+ alias: 'property'
10485
+ },
10486
+ number: /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
10487
+ boolean: /\b(?:FALSE|TRUE)\b/i,
10488
+ operator: /[-+*/^%=&,]|<[=>]?|>=?/,
10489
+ punctuation: /[[\]();{}|]/
10490
+ };
10491
+ Prism.languages['xlsx'] = Prism.languages['xls'] =
10492
+ Prism.languages['excel-formula'];
10493
+ }
10494
+ return excelFormula_1;
10495
+ }
10496
+
10497
+ var factor_1;
10498
+ var hasRequiredFactor;
10499
+
10500
+ function requireFactor () {
10501
+ if (hasRequiredFactor) return factor_1;
10502
+ hasRequiredFactor = 1;
10503
+
10504
+ factor_1 = factor;
10505
+ factor.displayName = 'factor';
10506
+ factor.aliases = [];
10507
+ function factor(Prism) {
10414
10508
  (function (Prism) {
10415
- var comment_inside = {
10416
- function:
10417
- /\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/
10418
- };
10419
- var string_inside = {
10420
- number: /\\[^\s']|%\w/
10421
- };
10422
- var factor = {
10423
- comment: [
10424
- {
10425
- // ! single-line exclamation point comments with whitespace after/around the !
10426
- pattern: /(^|\s)(?:! .*|!$)/,
10427
- lookbehind: true,
10428
- inside: comment_inside
10429
- },
10430
- /* from basis/multiline: */
10431
- {
10432
- // /* comment */, /* comment*/
10433
- pattern: /(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,
10434
- lookbehind: true,
10435
- greedy: true,
10436
- inside: comment_inside
10437
- },
10438
- {
10439
- // ![[ comment ]] , ![===[ comment]===]
10440
- pattern: /(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10441
- lookbehind: true,
10442
- greedy: true,
10443
- inside: comment_inside
10444
- }
10445
- ],
10446
- number: [
10447
- {
10448
- // basic base 10 integers 9, -9
10449
- pattern: /(^|\s)[+-]?\d+(?=\s|$)/,
10450
- lookbehind: true
10451
- },
10452
- {
10453
- // base prefix integers 0b010 0o70 0xad 0d10 0XAD -0xa9
10454
- pattern: /(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,
10455
- lookbehind: true
10456
- },
10457
- {
10458
- // fractional ratios 1/5 -1/5 and the literal float approximations 1/5. -1/5.
10459
- pattern: /(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,
10460
- lookbehind: true
10461
- },
10462
- {
10463
- // positive mixed numbers 23+1/5 +23+1/5
10464
- pattern: /(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,
10465
- lookbehind: true
10466
- },
10467
- {
10468
- // negative mixed numbers -23-1/5
10469
- pattern: /(^|\s)-\d+-\d+\/\d+(?=\s|$)/,
10470
- lookbehind: true
10471
- },
10472
- {
10473
- // basic decimal floats -0.01 0. .0 .1 -.1 -1. -12.13 +12.13
10474
- // and scientific notation with base 10 exponents 3e4 3e-4 .3e-4
10475
- pattern:
10476
- /(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,
10477
- lookbehind: true
10478
- },
10479
- {
10480
- // NAN literal syntax NAN: 80000deadbeef, NAN: a
10481
- pattern: /(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,
10482
- lookbehind: true
10483
- },
10484
- {
10485
- /*
10486
- base prefix floats 0x1.0p3 (8.0) 0b1.010p2 (5.0) 0x1.p1 0b1.11111111p11111...
10487
- "The normalized hex form ±0x1.MMMMMMMMMMMMM[pP]±EEEE allows any floating-point number to be specified precisely.
10488
- The values of MMMMMMMMMMMMM and EEEE map directly to the mantissa and exponent fields of the binary IEEE 754 representation."
10489
- <https://docs.factorcode.org/content/article-syntax-floats.html>
10490
- */
10491
- pattern:
10492
- /(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,
10493
- lookbehind: true
10494
- }
10495
- ],
10496
- // R/ regexp?\/\\/
10497
- regexp: {
10498
- pattern:
10499
- /(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,
10500
- lookbehind: true,
10501
- alias: 'number',
10502
- inside: {
10503
- variable: /\\\S/,
10504
- keyword: /[+?*\[\]^$(){}.|]/,
10505
- operator: {
10506
- pattern: /(\/)[idmsr]+(?:-[idmsr]+)?/,
10507
- lookbehind: true
10508
- }
10509
- }
10510
- },
10511
- boolean: {
10512
- pattern: /(^|\s)[tf](?=\s|$)/,
10513
- lookbehind: true
10514
- },
10515
- // SBUF" asd", URL" ://...", P" /etc/"
10516
- 'custom-string': {
10517
- pattern: /(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,
10518
- lookbehind: true,
10519
- greedy: true,
10520
- alias: 'string',
10521
- inside: {
10522
- number: /\\\S|%\w|\//
10523
- }
10524
- },
10525
- 'multiline-string': [
10526
- {
10527
- // STRING: name \n content \n ; -> CONSTANT: name "content" (symbol)
10528
- pattern: /(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,
10529
- lookbehind: true,
10530
- greedy: true,
10531
- alias: 'string',
10532
- inside: {
10533
- number: string_inside.number,
10534
- // trailing semicolon on its own line
10535
- 'semicolon-or-setlocal': {
10536
- pattern: /([\r\n][ \t]*);(?=\s|$)/,
10537
- lookbehind: true,
10538
- alias: 'function'
10539
- }
10540
- }
10541
- },
10542
- {
10543
- // HEREDOC: marker \n content \n marker ; -> "content" (immediate)
10544
- pattern: /(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,
10545
- lookbehind: true,
10546
- greedy: true,
10547
- alias: 'string',
10548
- inside: string_inside
10549
- },
10550
- {
10551
- // [[ string ]], [==[ string]==]
10552
- pattern: /(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10553
- lookbehind: true,
10554
- greedy: true,
10555
- alias: 'string',
10556
- inside: string_inside
10557
- }
10558
- ],
10559
- 'special-using': {
10560
- pattern: /(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,
10561
- lookbehind: true,
10562
- alias: 'function',
10563
- inside: {
10564
- // this is essentially a regex for vocab names, which i don't want to specify
10565
- // but the USING: gets picked up as a vocab name
10566
- string: {
10567
- pattern: /(\s)[^:\s]+/,
10568
- lookbehind: true
10569
- }
10570
- }
10571
- },
10572
- /* this description of stack effect literal syntax is not complete and not as specific as theoretically possible
10573
- trying to do better is more work and regex-computation-time than it's worth though.
10574
- - we'd like to have the "delimiter" parts of the stack effect [ (, --, and ) ] be a different (less-important or comment-like) colour to the stack effect contents
10575
- - we'd like if nested stack effects were treated as such rather than just appearing flat (with `inside`)
10576
- - we'd like if the following variable name conventions were recognised specifically:
10577
- special row variables = ..a b..
10578
- type and stack effect annotations end with a colon = ( quot: ( a: ( -- ) -- b ) -- x ), ( x: number -- )
10579
- word throws unconditional error = *
10580
- any other word-like variable name = a ? q' etc
10581
- https://docs.factorcode.org/content/article-effects.html
10582
- these are pretty complicated to highlight properly without a real parser, and therefore out of scope
10583
- the old pattern, which may be later useful, was: (^|\s)(?:call|execute|eval)?\((?:\s+[^"\r\n\t ]\S*)*?\s+--(?:\s+[^"\n\t ]\S*)*?\s+\)(?=\s|$)
10584
- */
10585
- // current solution is not great
10586
- 'stack-effect-delimiter': [
10587
- {
10588
- // opening parenthesis
10589
- pattern: /(^|\s)(?:call|eval|execute)?\((?=\s)/,
10590
- lookbehind: true,
10591
- alias: 'operator'
10592
- },
10593
- {
10594
- // middle --
10595
- pattern: /(\s)--(?=\s)/,
10596
- lookbehind: true,
10597
- alias: 'operator'
10598
- },
10599
- {
10600
- // closing parenthesis
10601
- pattern: /(\s)\)(?=\s|$)/,
10602
- lookbehind: true,
10603
- alias: 'operator'
10604
- }
10605
- ],
10606
- combinators: {
10607
- pattern: null,
10608
- lookbehind: true,
10609
- alias: 'keyword'
10610
- },
10611
- 'kernel-builtin': {
10612
- pattern: null,
10613
- lookbehind: true,
10614
- alias: 'variable'
10615
- },
10616
- 'sequences-builtin': {
10617
- pattern: null,
10618
- lookbehind: true,
10619
- alias: 'variable'
10620
- },
10621
- 'math-builtin': {
10622
- pattern: null,
10623
- lookbehind: true,
10624
- alias: 'variable'
10625
- },
10626
- 'constructor-word': {
10627
- // <array> but not <=>
10628
- pattern: /(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,
10629
- lookbehind: true,
10630
- alias: 'keyword'
10631
- },
10632
- 'other-builtin-syntax': {
10633
- pattern: null,
10634
- lookbehind: true,
10635
- alias: 'operator'
10636
- },
10637
- /*
10638
- full list of supported word naming conventions: (the convention appears outside of the [brackets])
10639
- set-[x]
10640
- change-[x]
10641
- with-[x]
10642
- new-[x]
10643
- >[string]
10644
- [base]>
10645
- [string]>[number]
10646
- +[symbol]+
10647
- [boolean-word]?
10648
- ?[of]
10649
- [slot-reader]>>
10650
- >>[slot-setter]
10651
- [slot-writer]<<
10652
- ([implementation-detail])
10653
- [mutater]!
10654
- [variant]*
10655
- [prettyprint].
10656
- $[help-markup]
10657
- <constructors>, SYNTAX:, etc are supported by their own patterns.
10658
- `with` and `new` from `kernel` are their own builtins.
10659
- see <https://docs.factorcode.org/content/article-conventions.html>
10660
- */
10661
- 'conventionally-named-word': {
10662
- pattern:
10663
- /(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,
10664
- lookbehind: true,
10665
- alias: 'keyword'
10666
- },
10667
- 'colon-syntax': {
10668
- pattern: /(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,
10669
- lookbehind: true,
10670
- greedy: true,
10671
- alias: 'function'
10672
- },
10673
- 'semicolon-or-setlocal': {
10674
- pattern: /(\s)(?:;|:>)(?=\s|$)/,
10675
- lookbehind: true,
10676
- alias: 'function'
10677
- },
10678
- // do not highlight leading } or trailing X{ at the begin/end of the file as it's invalid syntax
10679
- 'curly-brace-literal-delimiter': [
10680
- {
10681
- // opening
10682
- pattern: /(^|\s)[a-z]*\{(?=\s)/i,
10683
- lookbehind: true,
10684
- alias: 'operator'
10685
- },
10686
- {
10687
- // closing
10688
- pattern: /(\s)\}(?=\s|$)/,
10689
- lookbehind: true,
10690
- alias: 'operator'
10691
- }
10692
- ],
10693
- // do not highlight leading ] or trailing [ at the begin/end of the file as it's invalid syntax
10694
- 'quotation-delimiter': [
10695
- {
10696
- // opening
10697
- pattern: /(^|\s)\[(?=\s)/,
10698
- lookbehind: true,
10699
- alias: 'operator'
10700
- },
10701
- {
10702
- // closing
10703
- pattern: /(\s)\](?=\s|$)/,
10704
- lookbehind: true,
10705
- alias: 'operator'
10706
- }
10707
- ],
10708
- 'normal-word': {
10709
- pattern: /(^|\s)[^"\s]\S*(?=\s|$)/,
10710
- lookbehind: true
10711
- },
10712
- /*
10713
- basic first-class string "a"
10714
- with escaped double-quote "a\""
10715
- escaped backslash "\\"
10716
- and general escapes since Factor has so many "\N"
10717
- syntax that works in the reference implementation that isn't fully
10718
- supported because it's an implementation detail:
10719
- "string 1""string 2" -> 2 strings (works anyway)
10720
- "string"5 -> string, 5
10721
- "string"[ ] -> string, quotation
10722
- { "a"} -> array<string>
10723
- the rest of those examples all properly recognise the string, but not
10724
- the other object (number, quotation, etc)
10725
- this is fine for a regex-only implementation.
10726
- */
10727
- string: {
10728
- pattern: /"(?:\\\S|[^"\\])*"/,
10729
- greedy: true,
10730
- inside: string_inside
10731
- }
10732
- };
10733
- var escape = function (str) {
10734
- return (str + '').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1')
10735
- };
10736
- var arrToWordsRegExp = function (arr) {
10737
- return new RegExp('(^|\\s)(?:' + arr.map(escape).join('|') + ')(?=\\s|$)')
10738
- };
10739
- var builtins = {
10740
- 'kernel-builtin': [
10741
- 'or',
10742
- '2nipd',
10743
- '4drop',
10744
- 'tuck',
10745
- 'wrapper',
10746
- 'nip',
10747
- 'wrapper?',
10748
- 'callstack>array',
10749
- 'die',
10750
- 'dupd',
10751
- 'callstack',
10752
- 'callstack?',
10753
- '3dup',
10754
- 'hashcode',
10755
- 'pick',
10756
- '4nip',
10757
- 'build',
10758
- '>boolean',
10759
- 'nipd',
10760
- 'clone',
10761
- '5nip',
10762
- 'eq?',
10763
- '?',
10764
- '=',
10765
- 'swapd',
10766
- '2over',
10767
- 'clear',
10768
- '2dup',
10769
- 'get-retainstack',
10770
- 'not',
10771
- 'tuple?',
10772
- 'dup',
10773
- '3nipd',
10774
- 'call',
10775
- '-rotd',
10776
- 'object',
10777
- 'drop',
10778
- 'assert=',
10779
- 'assert?',
10780
- '-rot',
10781
- 'execute',
10782
- 'boa',
10783
- 'get-callstack',
10784
- 'curried?',
10785
- '3drop',
10786
- 'pickd',
10787
- 'overd',
10788
- 'over',
10789
- 'roll',
10790
- '3nip',
10791
- 'swap',
10792
- 'and',
10793
- '2nip',
10794
- 'rotd',
10795
- 'throw',
10796
- '(clone)',
10797
- 'hashcode*',
10798
- 'spin',
10799
- 'reach',
10800
- '4dup',
10801
- 'equal?',
10802
- 'get-datastack',
10803
- 'assert',
10804
- '2drop',
10805
- '<wrapper>',
10806
- 'boolean?',
10807
- 'identity-hashcode',
10808
- 'identity-tuple?',
10809
- 'null',
10810
- 'composed?',
10811
- 'new',
10812
- '5drop',
10813
- 'rot',
10814
- '-roll',
10815
- 'xor',
10816
- 'identity-tuple',
10817
- 'boolean'
10818
- ],
10819
- 'other-builtin-syntax': [
10820
- // syntax
10821
- '=======',
10822
- 'recursive',
10823
- 'flushable',
10824
- '>>',
10825
- '<<<<<<',
10826
- 'M\\',
10827
- 'B',
10828
- 'PRIVATE>',
10829
- '\\',
10830
- '======',
10831
- 'final',
10832
- 'inline',
10833
- 'delimiter',
10834
- 'deprecated',
10835
- '<PRIVATE',
10836
- '>>>>>>',
10837
- '<<<<<<<',
10838
- 'parse-complex',
10839
- 'malformed-complex',
10840
- 'read-only',
10841
- '>>>>>>>',
10842
- 'call-next-method',
10843
- '<<',
10844
- 'foldable', // literals
10845
- '$',
10846
- '$[',
10847
- '${'
10848
- ],
10849
- 'sequences-builtin': [
10850
- 'member-eq?',
10851
- 'mismatch',
10852
- 'append',
10853
- 'assert-sequence=',
10854
- 'longer',
10855
- 'repetition',
10856
- 'clone-like',
10857
- '3sequence',
10858
- 'assert-sequence?',
10859
- 'last-index-from',
10860
- 'reversed',
10861
- 'index-from',
10862
- 'cut*',
10863
- 'pad-tail',
10864
- 'join-as',
10865
- 'remove-eq!',
10866
- 'concat-as',
10867
- 'but-last',
10868
- 'snip',
10869
- 'nths',
10870
- 'nth',
10871
- 'sequence',
10872
- 'longest',
10873
- 'slice?',
10874
- '<slice>',
10875
- 'remove-nth',
10876
- 'tail-slice',
10877
- 'empty?',
10878
- 'tail*',
10879
- 'member?',
10880
- 'virtual-sequence?',
10881
- 'set-length',
10882
- 'drop-prefix',
10883
- 'iota',
10884
- 'unclip',
10885
- 'bounds-error?',
10886
- 'unclip-last-slice',
10887
- 'non-negative-integer-expected',
10888
- 'non-negative-integer-expected?',
10889
- 'midpoint@',
10890
- 'longer?',
10891
- '?set-nth',
10892
- '?first',
10893
- 'rest-slice',
10894
- 'prepend-as',
10895
- 'prepend',
10896
- 'fourth',
10897
- 'sift',
10898
- 'subseq-start',
10899
- 'new-sequence',
10900
- '?last',
10901
- 'like',
10902
- 'first4',
10903
- '1sequence',
10904
- 'reverse',
10905
- 'slice',
10906
- 'virtual@',
10907
- 'repetition?',
10908
- 'set-last',
10909
- 'index',
10910
- '4sequence',
10911
- 'max-length',
10912
- 'set-second',
10913
- 'immutable-sequence',
10914
- 'first2',
10915
- 'first3',
10916
- 'supremum',
10917
- 'unclip-slice',
10918
- 'suffix!',
10919
- 'insert-nth',
10920
- 'tail',
10921
- '3append',
10922
- 'short',
10923
- 'suffix',
10924
- 'concat',
10925
- 'flip',
10926
- 'immutable?',
10927
- 'reverse!',
10928
- '2sequence',
10929
- 'sum',
10930
- 'delete-all',
10931
- 'indices',
10932
- 'snip-slice',
10933
- '<iota>',
10934
- 'check-slice',
10935
- 'sequence?',
10936
- 'head',
10937
- 'append-as',
10938
- 'halves',
10939
- 'sequence=',
10940
- 'collapse-slice',
10941
- '?second',
10942
- 'slice-error?',
10943
- 'product',
10944
- 'bounds-check?',
10945
- 'bounds-check',
10946
- 'immutable',
10947
- 'virtual-exemplar',
10948
- 'harvest',
10949
- 'remove',
10950
- 'pad-head',
10951
- 'last',
10952
- 'set-fourth',
10953
- 'cartesian-product',
10954
- 'remove-eq',
10955
- 'shorten',
10956
- 'shorter',
10957
- 'reversed?',
10958
- 'shorter?',
10959
- 'shortest',
10960
- 'head-slice',
10961
- 'pop*',
10962
- 'tail-slice*',
10963
- 'but-last-slice',
10964
- 'iota?',
10965
- 'append!',
10966
- 'cut-slice',
10967
- 'new-resizable',
10968
- 'head-slice*',
10969
- 'sequence-hashcode',
10970
- 'pop',
10971
- 'set-nth',
10972
- '?nth',
10973
- 'second',
10974
- 'join',
10975
- 'immutable-sequence?',
10976
- '<reversed>',
10977
- '3append-as',
10978
- 'virtual-sequence',
10979
- 'subseq?',
10980
- 'remove-nth!',
10981
- 'length',
10982
- 'last-index',
10983
- 'lengthen',
10984
- 'assert-sequence',
10985
- 'copy',
10986
- 'move',
10987
- 'third',
10988
- 'first',
10989
- 'tail?',
10990
- 'set-first',
10991
- 'prefix',
10992
- 'bounds-error',
10993
- '<repetition>',
10994
- 'exchange',
10995
- 'surround',
10996
- 'cut',
10997
- 'min-length',
10998
- 'set-third',
10999
- 'push-all',
11000
- 'head?',
11001
- 'subseq-start-from',
11002
- 'delete-slice',
11003
- 'rest',
11004
- 'sum-lengths',
11005
- 'head*',
11006
- 'infimum',
11007
- 'remove!',
11008
- 'glue',
11009
- 'slice-error',
11010
- 'subseq',
11011
- 'push',
11012
- 'replace-slice',
11013
- 'subseq-as',
11014
- 'unclip-last'
11015
- ],
11016
- 'math-builtin': [
11017
- 'number=',
11018
- 'next-power-of-2',
11019
- '?1+',
11020
- 'fp-special?',
11021
- 'imaginary-part',
11022
- 'float>bits',
11023
- 'number?',
11024
- 'fp-infinity?',
11025
- 'bignum?',
11026
- 'fp-snan?',
11027
- 'denominator',
11028
- 'gcd',
11029
- '*',
11030
- '+',
11031
- 'fp-bitwise=',
11032
- '-',
11033
- 'u>=',
11034
- '/',
11035
- '>=',
11036
- 'bitand',
11037
- 'power-of-2?',
11038
- 'log2-expects-positive',
11039
- 'neg?',
11040
- '<',
11041
- 'log2',
11042
- '>',
11043
- 'integer?',
11044
- 'number',
11045
- 'bits>double',
11046
- '2/',
11047
- 'zero?',
11048
- 'bits>float',
11049
- 'float?',
11050
- 'shift',
11051
- 'ratio?',
11052
- 'rect>',
11053
- 'even?',
11054
- 'ratio',
11055
- 'fp-sign',
11056
- 'bitnot',
11057
- '>fixnum',
11058
- 'complex?',
11059
- '/i',
11060
- 'integer>fixnum',
11061
- '/f',
11062
- 'sgn',
11063
- '>bignum',
11064
- 'next-float',
11065
- 'u<',
11066
- 'u>',
11067
- 'mod',
11068
- 'recip',
11069
- 'rational',
11070
- '>float',
11071
- '2^',
11072
- 'integer',
11073
- 'fixnum?',
11074
- 'neg',
11075
- 'fixnum',
11076
- 'sq',
11077
- 'bignum',
11078
- '>rect',
11079
- 'bit?',
11080
- 'fp-qnan?',
11081
- 'simple-gcd',
11082
- 'complex',
11083
- '<fp-nan>',
11084
- 'real',
11085
- '>fraction',
11086
- 'double>bits',
11087
- 'bitor',
11088
- 'rem',
11089
- 'fp-nan-payload',
11090
- 'real-part',
11091
- 'log2-expects-positive?',
11092
- 'prev-float',
11093
- 'align',
11094
- 'unordered?',
11095
- 'float',
11096
- 'fp-nan?',
11097
- 'abs',
11098
- 'bitxor',
11099
- 'integer>fixnum-strict',
11100
- 'u<=',
11101
- 'odd?',
11102
- '<=',
11103
- '/mod',
11104
- '>integer',
11105
- 'real?',
11106
- 'rational?',
11107
- 'numerator'
11108
- ] // that's all for now
11109
- };
11110
- Object.keys(builtins).forEach(function (k) {
11111
- factor[k].pattern = arrToWordsRegExp(builtins[k]);
11112
- });
11113
- var combinators = [
11114
- // kernel
11115
- '2bi',
11116
- 'while',
11117
- '2tri',
11118
- 'bi*',
11119
- '4dip',
11120
- 'both?',
11121
- 'same?',
11122
- 'tri@',
11123
- 'curry',
11124
- 'prepose',
11125
- '3bi',
11126
- '?if',
11127
- 'tri*',
11128
- '2keep',
11129
- '3keep',
11130
- 'curried',
11131
- '2keepd',
11132
- 'when',
11133
- '2bi*',
11134
- '2tri*',
11135
- '4keep',
11136
- 'bi@',
11137
- 'keepdd',
11138
- 'do',
11139
- 'unless*',
11140
- 'tri-curry',
11141
- 'if*',
11142
- 'loop',
11143
- 'bi-curry*',
11144
- 'when*',
11145
- '2bi@',
11146
- '2tri@',
11147
- 'with',
11148
- '2with',
11149
- 'either?',
11150
- 'bi',
11151
- 'until',
11152
- '3dip',
11153
- '3curry',
11154
- 'tri-curry*',
11155
- 'tri-curry@',
11156
- 'bi-curry',
11157
- 'keepd',
11158
- 'compose',
11159
- '2dip',
11160
- 'if',
11161
- '3tri',
11162
- 'unless',
11163
- 'tuple',
11164
- 'keep',
11165
- '2curry',
11166
- 'tri',
11167
- 'most',
11168
- 'while*',
11169
- 'dip',
11170
- 'composed',
11171
- 'bi-curry@', // sequences
11172
- 'find-last-from',
11173
- 'trim-head-slice',
11174
- 'map-as',
11175
- 'each-from',
11176
- 'none?',
11177
- 'trim-tail',
11178
- 'partition',
11179
- 'if-empty',
11180
- 'accumulate*',
11181
- 'reject!',
11182
- 'find-from',
11183
- 'accumulate-as',
11184
- 'collector-for-as',
11185
- 'reject',
11186
- 'map',
11187
- 'map-sum',
11188
- 'accumulate!',
11189
- '2each-from',
11190
- 'follow',
11191
- 'supremum-by',
11192
- 'map!',
11193
- 'unless-empty',
11194
- 'collector',
11195
- 'padding',
11196
- 'reduce-index',
11197
- 'replicate-as',
11198
- 'infimum-by',
11199
- 'trim-tail-slice',
11200
- 'count',
11201
- 'find-index',
11202
- 'filter',
11203
- 'accumulate*!',
11204
- 'reject-as',
11205
- 'map-integers',
11206
- 'map-find',
11207
- 'reduce',
11208
- 'selector',
11209
- 'interleave',
11210
- '2map',
11211
- 'filter-as',
11212
- 'binary-reduce',
11213
- 'map-index-as',
11214
- 'find',
11215
- 'produce',
11216
- 'filter!',
11217
- 'replicate',
11218
- 'cartesian-map',
11219
- 'cartesian-each',
11220
- 'find-index-from',
11221
- 'map-find-last',
11222
- '3map-as',
11223
- '3map',
11224
- 'find-last',
11225
- 'selector-as',
11226
- '2map-as',
11227
- '2map-reduce',
11228
- 'accumulate',
11229
- 'each',
11230
- 'each-index',
11231
- 'accumulate*-as',
11232
- 'when-empty',
11233
- 'all?',
11234
- 'collector-as',
11235
- 'push-either',
11236
- 'new-like',
11237
- 'collector-for',
11238
- '2selector',
11239
- 'push-if',
11240
- '2all?',
11241
- 'map-reduce',
11242
- '3each',
11243
- 'any?',
11244
- 'trim-slice',
11245
- '2reduce',
11246
- 'change-nth',
11247
- 'produce-as',
11248
- '2each',
11249
- 'trim',
11250
- 'trim-head',
11251
- 'cartesian-find',
11252
- 'map-index', // math
11253
- 'if-zero',
11254
- 'each-integer',
11255
- 'unless-zero',
11256
- '(find-integer)',
11257
- 'when-zero',
11258
- 'find-last-integer',
11259
- '(all-integers?)',
11260
- 'times',
11261
- '(each-integer)',
11262
- 'find-integer',
11263
- 'all-integers?', // math.combinators
11264
- 'unless-negative',
11265
- 'if-positive',
11266
- 'when-positive',
11267
- 'when-negative',
11268
- 'unless-positive',
11269
- 'if-negative', // combinators
11270
- 'case',
11271
- '2cleave',
11272
- 'cond>quot',
11273
- 'case>quot',
11274
- '3cleave',
11275
- 'wrong-values',
11276
- 'to-fixed-point',
11277
- 'alist>quot',
11278
- 'cond',
11279
- 'cleave',
11280
- 'call-effect',
11281
- 'recursive-hashcode',
11282
- 'spread',
11283
- 'deep-spread>quot', // combinators.short-circuit
11284
- '2||',
11285
- '0||',
11286
- 'n||',
11287
- '0&&',
11288
- '2&&',
11289
- '3||',
11290
- '1||',
11291
- '1&&',
11292
- 'n&&',
11293
- '3&&', // combinators.smart
11294
- 'smart-unless*',
11295
- 'keep-inputs',
11296
- 'reduce-outputs',
11297
- 'smart-when*',
11298
- 'cleave>array',
11299
- 'smart-with',
11300
- 'smart-apply',
11301
- 'smart-if',
11302
- 'inputs/outputs',
11303
- 'output>sequence-n',
11304
- 'map-outputs',
11305
- 'map-reduce-outputs',
11306
- 'dropping',
11307
- 'output>array',
11308
- 'smart-map-reduce',
11309
- 'smart-2map-reduce',
11310
- 'output>array-n',
11311
- 'nullary',
11312
- 'input<sequence',
11313
- 'append-outputs',
11314
- 'drop-inputs',
11315
- 'inputs',
11316
- 'smart-2reduce',
11317
- 'drop-outputs',
11318
- 'smart-reduce',
11319
- 'preserving',
11320
- 'smart-when',
11321
- 'outputs',
11322
- 'append-outputs-as',
11323
- 'smart-unless',
11324
- 'smart-if*',
11325
- 'sum-outputs',
11326
- 'input<sequence-unsafe',
11327
- 'output>sequence' // tafn
11328
- ];
11329
- factor.combinators.pattern = arrToWordsRegExp(combinators);
11330
- Prism.languages.factor = factor;
11331
- })(Prism);
10509
+ var comment_inside = {
10510
+ function:
10511
+ /\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/
10512
+ };
10513
+ var string_inside = {
10514
+ number: /\\[^\s']|%\w/
10515
+ };
10516
+ var factor = {
10517
+ comment: [
10518
+ {
10519
+ // ! single-line exclamation point comments with whitespace after/around the !
10520
+ pattern: /(^|\s)(?:! .*|!$)/,
10521
+ lookbehind: true,
10522
+ inside: comment_inside
10523
+ },
10524
+ /* from basis/multiline: */
10525
+ {
10526
+ // /* comment */, /* comment*/
10527
+ pattern: /(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,
10528
+ lookbehind: true,
10529
+ greedy: true,
10530
+ inside: comment_inside
10531
+ },
10532
+ {
10533
+ // ![[ comment ]] , ![===[ comment]===]
10534
+ pattern: /(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10535
+ lookbehind: true,
10536
+ greedy: true,
10537
+ inside: comment_inside
10538
+ }
10539
+ ],
10540
+ number: [
10541
+ {
10542
+ // basic base 10 integers 9, -9
10543
+ pattern: /(^|\s)[+-]?\d+(?=\s|$)/,
10544
+ lookbehind: true
10545
+ },
10546
+ {
10547
+ // base prefix integers 0b010 0o70 0xad 0d10 0XAD -0xa9
10548
+ pattern: /(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,
10549
+ lookbehind: true
10550
+ },
10551
+ {
10552
+ // fractional ratios 1/5 -1/5 and the literal float approximations 1/5. -1/5.
10553
+ pattern: /(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,
10554
+ lookbehind: true
10555
+ },
10556
+ {
10557
+ // positive mixed numbers 23+1/5 +23+1/5
10558
+ pattern: /(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,
10559
+ lookbehind: true
10560
+ },
10561
+ {
10562
+ // negative mixed numbers -23-1/5
10563
+ pattern: /(^|\s)-\d+-\d+\/\d+(?=\s|$)/,
10564
+ lookbehind: true
10565
+ },
10566
+ {
10567
+ // basic decimal floats -0.01 0. .0 .1 -.1 -1. -12.13 +12.13
10568
+ // and scientific notation with base 10 exponents 3e4 3e-4 .3e-4
10569
+ pattern:
10570
+ /(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,
10571
+ lookbehind: true
10572
+ },
10573
+ {
10574
+ // NAN literal syntax NAN: 80000deadbeef, NAN: a
10575
+ pattern: /(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,
10576
+ lookbehind: true
10577
+ },
10578
+ {
10579
+ /*
10580
+ base prefix floats 0x1.0p3 (8.0) 0b1.010p2 (5.0) 0x1.p1 0b1.11111111p11111...
10581
+ "The normalized hex form ±0x1.MMMMMMMMMMMMM[pP]±EEEE allows any floating-point number to be specified precisely.
10582
+ The values of MMMMMMMMMMMMM and EEEE map directly to the mantissa and exponent fields of the binary IEEE 754 representation."
10583
+ <https://docs.factorcode.org/content/article-syntax-floats.html>
10584
+ */
10585
+ pattern:
10586
+ /(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,
10587
+ lookbehind: true
10588
+ }
10589
+ ],
10590
+ // R/ regexp?\/\\/
10591
+ regexp: {
10592
+ pattern:
10593
+ /(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,
10594
+ lookbehind: true,
10595
+ alias: 'number',
10596
+ inside: {
10597
+ variable: /\\\S/,
10598
+ keyword: /[+?*\[\]^$(){}.|]/,
10599
+ operator: {
10600
+ pattern: /(\/)[idmsr]+(?:-[idmsr]+)?/,
10601
+ lookbehind: true
10602
+ }
10603
+ }
10604
+ },
10605
+ boolean: {
10606
+ pattern: /(^|\s)[tf](?=\s|$)/,
10607
+ lookbehind: true
10608
+ },
10609
+ // SBUF" asd", URL" ://...", P" /etc/"
10610
+ 'custom-string': {
10611
+ pattern: /(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,
10612
+ lookbehind: true,
10613
+ greedy: true,
10614
+ alias: 'string',
10615
+ inside: {
10616
+ number: /\\\S|%\w|\//
10617
+ }
10618
+ },
10619
+ 'multiline-string': [
10620
+ {
10621
+ // STRING: name \n content \n ; -> CONSTANT: name "content" (symbol)
10622
+ pattern: /(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,
10623
+ lookbehind: true,
10624
+ greedy: true,
10625
+ alias: 'string',
10626
+ inside: {
10627
+ number: string_inside.number,
10628
+ // trailing semicolon on its own line
10629
+ 'semicolon-or-setlocal': {
10630
+ pattern: /([\r\n][ \t]*);(?=\s|$)/,
10631
+ lookbehind: true,
10632
+ alias: 'function'
10633
+ }
10634
+ }
10635
+ },
10636
+ {
10637
+ // HEREDOC: marker \n content \n marker ; -> "content" (immediate)
10638
+ pattern: /(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,
10639
+ lookbehind: true,
10640
+ greedy: true,
10641
+ alias: 'string',
10642
+ inside: string_inside
10643
+ },
10644
+ {
10645
+ // [[ string ]], [==[ string]==]
10646
+ pattern: /(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,
10647
+ lookbehind: true,
10648
+ greedy: true,
10649
+ alias: 'string',
10650
+ inside: string_inside
10651
+ }
10652
+ ],
10653
+ 'special-using': {
10654
+ pattern: /(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,
10655
+ lookbehind: true,
10656
+ alias: 'function',
10657
+ inside: {
10658
+ // this is essentially a regex for vocab names, which i don't want to specify
10659
+ // but the USING: gets picked up as a vocab name
10660
+ string: {
10661
+ pattern: /(\s)[^:\s]+/,
10662
+ lookbehind: true
10663
+ }
10664
+ }
10665
+ },
10666
+ /* this description of stack effect literal syntax is not complete and not as specific as theoretically possible
10667
+ trying to do better is more work and regex-computation-time than it's worth though.
10668
+ - we'd like to have the "delimiter" parts of the stack effect [ (, --, and ) ] be a different (less-important or comment-like) colour to the stack effect contents
10669
+ - we'd like if nested stack effects were treated as such rather than just appearing flat (with `inside`)
10670
+ - we'd like if the following variable name conventions were recognised specifically:
10671
+ special row variables = ..a b..
10672
+ type and stack effect annotations end with a colon = ( quot: ( a: ( -- ) -- b ) -- x ), ( x: number -- )
10673
+ word throws unconditional error = *
10674
+ any other word-like variable name = a ? q' etc
10675
+ https://docs.factorcode.org/content/article-effects.html
10676
+ these are pretty complicated to highlight properly without a real parser, and therefore out of scope
10677
+ the old pattern, which may be later useful, was: (^|\s)(?:call|execute|eval)?\((?:\s+[^"\r\n\t ]\S*)*?\s+--(?:\s+[^"\n\t ]\S*)*?\s+\)(?=\s|$)
10678
+ */
10679
+ // current solution is not great
10680
+ 'stack-effect-delimiter': [
10681
+ {
10682
+ // opening parenthesis
10683
+ pattern: /(^|\s)(?:call|eval|execute)?\((?=\s)/,
10684
+ lookbehind: true,
10685
+ alias: 'operator'
10686
+ },
10687
+ {
10688
+ // middle --
10689
+ pattern: /(\s)--(?=\s)/,
10690
+ lookbehind: true,
10691
+ alias: 'operator'
10692
+ },
10693
+ {
10694
+ // closing parenthesis
10695
+ pattern: /(\s)\)(?=\s|$)/,
10696
+ lookbehind: true,
10697
+ alias: 'operator'
10698
+ }
10699
+ ],
10700
+ combinators: {
10701
+ pattern: null,
10702
+ lookbehind: true,
10703
+ alias: 'keyword'
10704
+ },
10705
+ 'kernel-builtin': {
10706
+ pattern: null,
10707
+ lookbehind: true,
10708
+ alias: 'variable'
10709
+ },
10710
+ 'sequences-builtin': {
10711
+ pattern: null,
10712
+ lookbehind: true,
10713
+ alias: 'variable'
10714
+ },
10715
+ 'math-builtin': {
10716
+ pattern: null,
10717
+ lookbehind: true,
10718
+ alias: 'variable'
10719
+ },
10720
+ 'constructor-word': {
10721
+ // <array> but not <=>
10722
+ pattern: /(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,
10723
+ lookbehind: true,
10724
+ alias: 'keyword'
10725
+ },
10726
+ 'other-builtin-syntax': {
10727
+ pattern: null,
10728
+ lookbehind: true,
10729
+ alias: 'operator'
10730
+ },
10731
+ /*
10732
+ full list of supported word naming conventions: (the convention appears outside of the [brackets])
10733
+ set-[x]
10734
+ change-[x]
10735
+ with-[x]
10736
+ new-[x]
10737
+ >[string]
10738
+ [base]>
10739
+ [string]>[number]
10740
+ +[symbol]+
10741
+ [boolean-word]?
10742
+ ?[of]
10743
+ [slot-reader]>>
10744
+ >>[slot-setter]
10745
+ [slot-writer]<<
10746
+ ([implementation-detail])
10747
+ [mutater]!
10748
+ [variant]*
10749
+ [prettyprint].
10750
+ $[help-markup]
10751
+ <constructors>, SYNTAX:, etc are supported by their own patterns.
10752
+ `with` and `new` from `kernel` are their own builtins.
10753
+ see <https://docs.factorcode.org/content/article-conventions.html>
10754
+ */
10755
+ 'conventionally-named-word': {
10756
+ pattern:
10757
+ /(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,
10758
+ lookbehind: true,
10759
+ alias: 'keyword'
10760
+ },
10761
+ 'colon-syntax': {
10762
+ pattern: /(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,
10763
+ lookbehind: true,
10764
+ greedy: true,
10765
+ alias: 'function'
10766
+ },
10767
+ 'semicolon-or-setlocal': {
10768
+ pattern: /(\s)(?:;|:>)(?=\s|$)/,
10769
+ lookbehind: true,
10770
+ alias: 'function'
10771
+ },
10772
+ // do not highlight leading } or trailing X{ at the begin/end of the file as it's invalid syntax
10773
+ 'curly-brace-literal-delimiter': [
10774
+ {
10775
+ // opening
10776
+ pattern: /(^|\s)[a-z]*\{(?=\s)/i,
10777
+ lookbehind: true,
10778
+ alias: 'operator'
10779
+ },
10780
+ {
10781
+ // closing
10782
+ pattern: /(\s)\}(?=\s|$)/,
10783
+ lookbehind: true,
10784
+ alias: 'operator'
10785
+ }
10786
+ ],
10787
+ // do not highlight leading ] or trailing [ at the begin/end of the file as it's invalid syntax
10788
+ 'quotation-delimiter': [
10789
+ {
10790
+ // opening
10791
+ pattern: /(^|\s)\[(?=\s)/,
10792
+ lookbehind: true,
10793
+ alias: 'operator'
10794
+ },
10795
+ {
10796
+ // closing
10797
+ pattern: /(\s)\](?=\s|$)/,
10798
+ lookbehind: true,
10799
+ alias: 'operator'
10800
+ }
10801
+ ],
10802
+ 'normal-word': {
10803
+ pattern: /(^|\s)[^"\s]\S*(?=\s|$)/,
10804
+ lookbehind: true
10805
+ },
10806
+ /*
10807
+ basic first-class string "a"
10808
+ with escaped double-quote "a\""
10809
+ escaped backslash "\\"
10810
+ and general escapes since Factor has so many "\N"
10811
+ syntax that works in the reference implementation that isn't fully
10812
+ supported because it's an implementation detail:
10813
+ "string 1""string 2" -> 2 strings (works anyway)
10814
+ "string"5 -> string, 5
10815
+ "string"[ ] -> string, quotation
10816
+ { "a"} -> array<string>
10817
+ the rest of those examples all properly recognise the string, but not
10818
+ the other object (number, quotation, etc)
10819
+ this is fine for a regex-only implementation.
10820
+ */
10821
+ string: {
10822
+ pattern: /"(?:\\\S|[^"\\])*"/,
10823
+ greedy: true,
10824
+ inside: string_inside
10825
+ }
10826
+ };
10827
+ var escape = function (str) {
10828
+ return (str + '').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1')
10829
+ };
10830
+ var arrToWordsRegExp = function (arr) {
10831
+ return new RegExp('(^|\\s)(?:' + arr.map(escape).join('|') + ')(?=\\s|$)')
10832
+ };
10833
+ var builtins = {
10834
+ 'kernel-builtin': [
10835
+ 'or',
10836
+ '2nipd',
10837
+ '4drop',
10838
+ 'tuck',
10839
+ 'wrapper',
10840
+ 'nip',
10841
+ 'wrapper?',
10842
+ 'callstack>array',
10843
+ 'die',
10844
+ 'dupd',
10845
+ 'callstack',
10846
+ 'callstack?',
10847
+ '3dup',
10848
+ 'hashcode',
10849
+ 'pick',
10850
+ '4nip',
10851
+ 'build',
10852
+ '>boolean',
10853
+ 'nipd',
10854
+ 'clone',
10855
+ '5nip',
10856
+ 'eq?',
10857
+ '?',
10858
+ '=',
10859
+ 'swapd',
10860
+ '2over',
10861
+ 'clear',
10862
+ '2dup',
10863
+ 'get-retainstack',
10864
+ 'not',
10865
+ 'tuple?',
10866
+ 'dup',
10867
+ '3nipd',
10868
+ 'call',
10869
+ '-rotd',
10870
+ 'object',
10871
+ 'drop',
10872
+ 'assert=',
10873
+ 'assert?',
10874
+ '-rot',
10875
+ 'execute',
10876
+ 'boa',
10877
+ 'get-callstack',
10878
+ 'curried?',
10879
+ '3drop',
10880
+ 'pickd',
10881
+ 'overd',
10882
+ 'over',
10883
+ 'roll',
10884
+ '3nip',
10885
+ 'swap',
10886
+ 'and',
10887
+ '2nip',
10888
+ 'rotd',
10889
+ 'throw',
10890
+ '(clone)',
10891
+ 'hashcode*',
10892
+ 'spin',
10893
+ 'reach',
10894
+ '4dup',
10895
+ 'equal?',
10896
+ 'get-datastack',
10897
+ 'assert',
10898
+ '2drop',
10899
+ '<wrapper>',
10900
+ 'boolean?',
10901
+ 'identity-hashcode',
10902
+ 'identity-tuple?',
10903
+ 'null',
10904
+ 'composed?',
10905
+ 'new',
10906
+ '5drop',
10907
+ 'rot',
10908
+ '-roll',
10909
+ 'xor',
10910
+ 'identity-tuple',
10911
+ 'boolean'
10912
+ ],
10913
+ 'other-builtin-syntax': [
10914
+ // syntax
10915
+ '=======',
10916
+ 'recursive',
10917
+ 'flushable',
10918
+ '>>',
10919
+ '<<<<<<',
10920
+ 'M\\',
10921
+ 'B',
10922
+ 'PRIVATE>',
10923
+ '\\',
10924
+ '======',
10925
+ 'final',
10926
+ 'inline',
10927
+ 'delimiter',
10928
+ 'deprecated',
10929
+ '<PRIVATE',
10930
+ '>>>>>>',
10931
+ '<<<<<<<',
10932
+ 'parse-complex',
10933
+ 'malformed-complex',
10934
+ 'read-only',
10935
+ '>>>>>>>',
10936
+ 'call-next-method',
10937
+ '<<',
10938
+ 'foldable', // literals
10939
+ '$',
10940
+ '$[',
10941
+ '${'
10942
+ ],
10943
+ 'sequences-builtin': [
10944
+ 'member-eq?',
10945
+ 'mismatch',
10946
+ 'append',
10947
+ 'assert-sequence=',
10948
+ 'longer',
10949
+ 'repetition',
10950
+ 'clone-like',
10951
+ '3sequence',
10952
+ 'assert-sequence?',
10953
+ 'last-index-from',
10954
+ 'reversed',
10955
+ 'index-from',
10956
+ 'cut*',
10957
+ 'pad-tail',
10958
+ 'join-as',
10959
+ 'remove-eq!',
10960
+ 'concat-as',
10961
+ 'but-last',
10962
+ 'snip',
10963
+ 'nths',
10964
+ 'nth',
10965
+ 'sequence',
10966
+ 'longest',
10967
+ 'slice?',
10968
+ '<slice>',
10969
+ 'remove-nth',
10970
+ 'tail-slice',
10971
+ 'empty?',
10972
+ 'tail*',
10973
+ 'member?',
10974
+ 'virtual-sequence?',
10975
+ 'set-length',
10976
+ 'drop-prefix',
10977
+ 'iota',
10978
+ 'unclip',
10979
+ 'bounds-error?',
10980
+ 'unclip-last-slice',
10981
+ 'non-negative-integer-expected',
10982
+ 'non-negative-integer-expected?',
10983
+ 'midpoint@',
10984
+ 'longer?',
10985
+ '?set-nth',
10986
+ '?first',
10987
+ 'rest-slice',
10988
+ 'prepend-as',
10989
+ 'prepend',
10990
+ 'fourth',
10991
+ 'sift',
10992
+ 'subseq-start',
10993
+ 'new-sequence',
10994
+ '?last',
10995
+ 'like',
10996
+ 'first4',
10997
+ '1sequence',
10998
+ 'reverse',
10999
+ 'slice',
11000
+ 'virtual@',
11001
+ 'repetition?',
11002
+ 'set-last',
11003
+ 'index',
11004
+ '4sequence',
11005
+ 'max-length',
11006
+ 'set-second',
11007
+ 'immutable-sequence',
11008
+ 'first2',
11009
+ 'first3',
11010
+ 'supremum',
11011
+ 'unclip-slice',
11012
+ 'suffix!',
11013
+ 'insert-nth',
11014
+ 'tail',
11015
+ '3append',
11016
+ 'short',
11017
+ 'suffix',
11018
+ 'concat',
11019
+ 'flip',
11020
+ 'immutable?',
11021
+ 'reverse!',
11022
+ '2sequence',
11023
+ 'sum',
11024
+ 'delete-all',
11025
+ 'indices',
11026
+ 'snip-slice',
11027
+ '<iota>',
11028
+ 'check-slice',
11029
+ 'sequence?',
11030
+ 'head',
11031
+ 'append-as',
11032
+ 'halves',
11033
+ 'sequence=',
11034
+ 'collapse-slice',
11035
+ '?second',
11036
+ 'slice-error?',
11037
+ 'product',
11038
+ 'bounds-check?',
11039
+ 'bounds-check',
11040
+ 'immutable',
11041
+ 'virtual-exemplar',
11042
+ 'harvest',
11043
+ 'remove',
11044
+ 'pad-head',
11045
+ 'last',
11046
+ 'set-fourth',
11047
+ 'cartesian-product',
11048
+ 'remove-eq',
11049
+ 'shorten',
11050
+ 'shorter',
11051
+ 'reversed?',
11052
+ 'shorter?',
11053
+ 'shortest',
11054
+ 'head-slice',
11055
+ 'pop*',
11056
+ 'tail-slice*',
11057
+ 'but-last-slice',
11058
+ 'iota?',
11059
+ 'append!',
11060
+ 'cut-slice',
11061
+ 'new-resizable',
11062
+ 'head-slice*',
11063
+ 'sequence-hashcode',
11064
+ 'pop',
11065
+ 'set-nth',
11066
+ '?nth',
11067
+ 'second',
11068
+ 'join',
11069
+ 'immutable-sequence?',
11070
+ '<reversed>',
11071
+ '3append-as',
11072
+ 'virtual-sequence',
11073
+ 'subseq?',
11074
+ 'remove-nth!',
11075
+ 'length',
11076
+ 'last-index',
11077
+ 'lengthen',
11078
+ 'assert-sequence',
11079
+ 'copy',
11080
+ 'move',
11081
+ 'third',
11082
+ 'first',
11083
+ 'tail?',
11084
+ 'set-first',
11085
+ 'prefix',
11086
+ 'bounds-error',
11087
+ '<repetition>',
11088
+ 'exchange',
11089
+ 'surround',
11090
+ 'cut',
11091
+ 'min-length',
11092
+ 'set-third',
11093
+ 'push-all',
11094
+ 'head?',
11095
+ 'subseq-start-from',
11096
+ 'delete-slice',
11097
+ 'rest',
11098
+ 'sum-lengths',
11099
+ 'head*',
11100
+ 'infimum',
11101
+ 'remove!',
11102
+ 'glue',
11103
+ 'slice-error',
11104
+ 'subseq',
11105
+ 'push',
11106
+ 'replace-slice',
11107
+ 'subseq-as',
11108
+ 'unclip-last'
11109
+ ],
11110
+ 'math-builtin': [
11111
+ 'number=',
11112
+ 'next-power-of-2',
11113
+ '?1+',
11114
+ 'fp-special?',
11115
+ 'imaginary-part',
11116
+ 'float>bits',
11117
+ 'number?',
11118
+ 'fp-infinity?',
11119
+ 'bignum?',
11120
+ 'fp-snan?',
11121
+ 'denominator',
11122
+ 'gcd',
11123
+ '*',
11124
+ '+',
11125
+ 'fp-bitwise=',
11126
+ '-',
11127
+ 'u>=',
11128
+ '/',
11129
+ '>=',
11130
+ 'bitand',
11131
+ 'power-of-2?',
11132
+ 'log2-expects-positive',
11133
+ 'neg?',
11134
+ '<',
11135
+ 'log2',
11136
+ '>',
11137
+ 'integer?',
11138
+ 'number',
11139
+ 'bits>double',
11140
+ '2/',
11141
+ 'zero?',
11142
+ 'bits>float',
11143
+ 'float?',
11144
+ 'shift',
11145
+ 'ratio?',
11146
+ 'rect>',
11147
+ 'even?',
11148
+ 'ratio',
11149
+ 'fp-sign',
11150
+ 'bitnot',
11151
+ '>fixnum',
11152
+ 'complex?',
11153
+ '/i',
11154
+ 'integer>fixnum',
11155
+ '/f',
11156
+ 'sgn',
11157
+ '>bignum',
11158
+ 'next-float',
11159
+ 'u<',
11160
+ 'u>',
11161
+ 'mod',
11162
+ 'recip',
11163
+ 'rational',
11164
+ '>float',
11165
+ '2^',
11166
+ 'integer',
11167
+ 'fixnum?',
11168
+ 'neg',
11169
+ 'fixnum',
11170
+ 'sq',
11171
+ 'bignum',
11172
+ '>rect',
11173
+ 'bit?',
11174
+ 'fp-qnan?',
11175
+ 'simple-gcd',
11176
+ 'complex',
11177
+ '<fp-nan>',
11178
+ 'real',
11179
+ '>fraction',
11180
+ 'double>bits',
11181
+ 'bitor',
11182
+ 'rem',
11183
+ 'fp-nan-payload',
11184
+ 'real-part',
11185
+ 'log2-expects-positive?',
11186
+ 'prev-float',
11187
+ 'align',
11188
+ 'unordered?',
11189
+ 'float',
11190
+ 'fp-nan?',
11191
+ 'abs',
11192
+ 'bitxor',
11193
+ 'integer>fixnum-strict',
11194
+ 'u<=',
11195
+ 'odd?',
11196
+ '<=',
11197
+ '/mod',
11198
+ '>integer',
11199
+ 'real?',
11200
+ 'rational?',
11201
+ 'numerator'
11202
+ ] // that's all for now
11203
+ };
11204
+ Object.keys(builtins).forEach(function (k) {
11205
+ factor[k].pattern = arrToWordsRegExp(builtins[k]);
11206
+ });
11207
+ var combinators = [
11208
+ // kernel
11209
+ '2bi',
11210
+ 'while',
11211
+ '2tri',
11212
+ 'bi*',
11213
+ '4dip',
11214
+ 'both?',
11215
+ 'same?',
11216
+ 'tri@',
11217
+ 'curry',
11218
+ 'prepose',
11219
+ '3bi',
11220
+ '?if',
11221
+ 'tri*',
11222
+ '2keep',
11223
+ '3keep',
11224
+ 'curried',
11225
+ '2keepd',
11226
+ 'when',
11227
+ '2bi*',
11228
+ '2tri*',
11229
+ '4keep',
11230
+ 'bi@',
11231
+ 'keepdd',
11232
+ 'do',
11233
+ 'unless*',
11234
+ 'tri-curry',
11235
+ 'if*',
11236
+ 'loop',
11237
+ 'bi-curry*',
11238
+ 'when*',
11239
+ '2bi@',
11240
+ '2tri@',
11241
+ 'with',
11242
+ '2with',
11243
+ 'either?',
11244
+ 'bi',
11245
+ 'until',
11246
+ '3dip',
11247
+ '3curry',
11248
+ 'tri-curry*',
11249
+ 'tri-curry@',
11250
+ 'bi-curry',
11251
+ 'keepd',
11252
+ 'compose',
11253
+ '2dip',
11254
+ 'if',
11255
+ '3tri',
11256
+ 'unless',
11257
+ 'tuple',
11258
+ 'keep',
11259
+ '2curry',
11260
+ 'tri',
11261
+ 'most',
11262
+ 'while*',
11263
+ 'dip',
11264
+ 'composed',
11265
+ 'bi-curry@', // sequences
11266
+ 'find-last-from',
11267
+ 'trim-head-slice',
11268
+ 'map-as',
11269
+ 'each-from',
11270
+ 'none?',
11271
+ 'trim-tail',
11272
+ 'partition',
11273
+ 'if-empty',
11274
+ 'accumulate*',
11275
+ 'reject!',
11276
+ 'find-from',
11277
+ 'accumulate-as',
11278
+ 'collector-for-as',
11279
+ 'reject',
11280
+ 'map',
11281
+ 'map-sum',
11282
+ 'accumulate!',
11283
+ '2each-from',
11284
+ 'follow',
11285
+ 'supremum-by',
11286
+ 'map!',
11287
+ 'unless-empty',
11288
+ 'collector',
11289
+ 'padding',
11290
+ 'reduce-index',
11291
+ 'replicate-as',
11292
+ 'infimum-by',
11293
+ 'trim-tail-slice',
11294
+ 'count',
11295
+ 'find-index',
11296
+ 'filter',
11297
+ 'accumulate*!',
11298
+ 'reject-as',
11299
+ 'map-integers',
11300
+ 'map-find',
11301
+ 'reduce',
11302
+ 'selector',
11303
+ 'interleave',
11304
+ '2map',
11305
+ 'filter-as',
11306
+ 'binary-reduce',
11307
+ 'map-index-as',
11308
+ 'find',
11309
+ 'produce',
11310
+ 'filter!',
11311
+ 'replicate',
11312
+ 'cartesian-map',
11313
+ 'cartesian-each',
11314
+ 'find-index-from',
11315
+ 'map-find-last',
11316
+ '3map-as',
11317
+ '3map',
11318
+ 'find-last',
11319
+ 'selector-as',
11320
+ '2map-as',
11321
+ '2map-reduce',
11322
+ 'accumulate',
11323
+ 'each',
11324
+ 'each-index',
11325
+ 'accumulate*-as',
11326
+ 'when-empty',
11327
+ 'all?',
11328
+ 'collector-as',
11329
+ 'push-either',
11330
+ 'new-like',
11331
+ 'collector-for',
11332
+ '2selector',
11333
+ 'push-if',
11334
+ '2all?',
11335
+ 'map-reduce',
11336
+ '3each',
11337
+ 'any?',
11338
+ 'trim-slice',
11339
+ '2reduce',
11340
+ 'change-nth',
11341
+ 'produce-as',
11342
+ '2each',
11343
+ 'trim',
11344
+ 'trim-head',
11345
+ 'cartesian-find',
11346
+ 'map-index', // math
11347
+ 'if-zero',
11348
+ 'each-integer',
11349
+ 'unless-zero',
11350
+ '(find-integer)',
11351
+ 'when-zero',
11352
+ 'find-last-integer',
11353
+ '(all-integers?)',
11354
+ 'times',
11355
+ '(each-integer)',
11356
+ 'find-integer',
11357
+ 'all-integers?', // math.combinators
11358
+ 'unless-negative',
11359
+ 'if-positive',
11360
+ 'when-positive',
11361
+ 'when-negative',
11362
+ 'unless-positive',
11363
+ 'if-negative', // combinators
11364
+ 'case',
11365
+ '2cleave',
11366
+ 'cond>quot',
11367
+ 'case>quot',
11368
+ '3cleave',
11369
+ 'wrong-values',
11370
+ 'to-fixed-point',
11371
+ 'alist>quot',
11372
+ 'cond',
11373
+ 'cleave',
11374
+ 'call-effect',
11375
+ 'recursive-hashcode',
11376
+ 'spread',
11377
+ 'deep-spread>quot', // combinators.short-circuit
11378
+ '2||',
11379
+ '0||',
11380
+ 'n||',
11381
+ '0&&',
11382
+ '2&&',
11383
+ '3||',
11384
+ '1||',
11385
+ '1&&',
11386
+ 'n&&',
11387
+ '3&&', // combinators.smart
11388
+ 'smart-unless*',
11389
+ 'keep-inputs',
11390
+ 'reduce-outputs',
11391
+ 'smart-when*',
11392
+ 'cleave>array',
11393
+ 'smart-with',
11394
+ 'smart-apply',
11395
+ 'smart-if',
11396
+ 'inputs/outputs',
11397
+ 'output>sequence-n',
11398
+ 'map-outputs',
11399
+ 'map-reduce-outputs',
11400
+ 'dropping',
11401
+ 'output>array',
11402
+ 'smart-map-reduce',
11403
+ 'smart-2map-reduce',
11404
+ 'output>array-n',
11405
+ 'nullary',
11406
+ 'input<sequence',
11407
+ 'append-outputs',
11408
+ 'drop-inputs',
11409
+ 'inputs',
11410
+ 'smart-2reduce',
11411
+ 'drop-outputs',
11412
+ 'smart-reduce',
11413
+ 'preserving',
11414
+ 'smart-when',
11415
+ 'outputs',
11416
+ 'append-outputs-as',
11417
+ 'smart-unless',
11418
+ 'smart-if*',
11419
+ 'sum-outputs',
11420
+ 'input<sequence-unsafe',
11421
+ 'output>sequence' // tafn
11422
+ ];
11423
+ factor.combinators.pattern = arrToWordsRegExp(combinators);
11424
+ Prism.languages.factor = factor;
11425
+ })(Prism);
11426
+ }
11427
+ return factor_1;
11332
11428
  }
11333
11429
 
11334
- var _false = $false;
11335
- $false.displayName = '$false';
11336
- $false.aliases = [];
11337
- function $false(Prism) {
11430
+ var _false;
11431
+ var hasRequired_false;
11432
+
11433
+ function require_false () {
11434
+ if (hasRequired_false) return _false;
11435
+ hasRequired_false = 1;
11436
+
11437
+ _false = $false;
11438
+ $false.displayName = '$false';
11439
+ $false.aliases = [];
11440
+ function $false(Prism) {
11338
11441
  (function (Prism) {
11339
- /**
11340
- * Based on the manual by Wouter van Oortmerssen.
11341
- *
11342
- * @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504}
11343
- */
11344
- Prism.languages['false'] = {
11345
- comment: {
11346
- pattern: /\{[^}]*\}/
11347
- },
11348
- string: {
11349
- pattern: /"[^"]*"/,
11350
- greedy: true
11351
- },
11352
- 'character-code': {
11353
- pattern: /'(?:[^\r]|\r\n?)/,
11354
- alias: 'number'
11355
- },
11356
- 'assembler-code': {
11357
- pattern: /\d+`/,
11358
- alias: 'important'
11359
- },
11360
- number: /\d+/,
11361
- operator: /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
11362
- punctuation: /\[|\]/,
11363
- variable: /[a-z]/,
11364
- 'non-standard': {
11365
- pattern: /[()<BDO®]/,
11366
- alias: 'bold'
11367
- }
11368
- };
11369
- })(Prism);
11442
+ /**
11443
+ * Based on the manual by Wouter van Oortmerssen.
11444
+ *
11445
+ * @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504}
11446
+ */
11447
+ Prism.languages['false'] = {
11448
+ comment: {
11449
+ pattern: /\{[^}]*\}/
11450
+ },
11451
+ string: {
11452
+ pattern: /"[^"]*"/,
11453
+ greedy: true
11454
+ },
11455
+ 'character-code': {
11456
+ pattern: /'(?:[^\r]|\r\n?)/,
11457
+ alias: 'number'
11458
+ },
11459
+ 'assembler-code': {
11460
+ pattern: /\d+`/,
11461
+ alias: 'important'
11462
+ },
11463
+ number: /\d+/,
11464
+ operator: /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,
11465
+ punctuation: /\[|\]/,
11466
+ variable: /[a-z]/,
11467
+ 'non-standard': {
11468
+ pattern: /[()<BDO®]/,
11469
+ alias: 'bold'
11470
+ }
11471
+ };
11472
+ })(Prism);
11473
+ }
11474
+ return _false;
11370
11475
  }
11371
11476
 
11372
- var firestoreSecurityRules_1 = firestoreSecurityRules;
11373
- firestoreSecurityRules.displayName = 'firestoreSecurityRules';
11374
- firestoreSecurityRules.aliases = [];
11375
- function firestoreSecurityRules(Prism) {
11376
- Prism.languages['firestore-security-rules'] = Prism.languages.extend(
11377
- 'clike',
11378
- {
11379
- comment: /\/\/.*/,
11380
- keyword:
11381
- /\b(?:allow|function|if|match|null|return|rules_version|service)\b/,
11382
- operator: /&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/
11383
- }
11384
- );
11385
- delete Prism.languages['firestore-security-rules']['class-name'];
11386
- Prism.languages.insertBefore('firestore-security-rules', 'keyword', {
11387
- path: {
11388
- pattern:
11389
- /(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,
11390
- lookbehind: true,
11391
- greedy: true,
11392
- inside: {
11393
- variable: {
11394
- pattern: /\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,
11395
- inside: {
11396
- operator: /=/,
11397
- keyword: /\*\*/,
11398
- punctuation: /[.$(){}]/
11399
- }
11400
- },
11401
- punctuation: /\//
11402
- }
11403
- },
11404
- method: {
11405
- // to make the pattern shorter, the actual method names are omitted
11406
- pattern: /(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,
11407
- lookbehind: true,
11408
- alias: 'builtin',
11409
- inside: {
11410
- punctuation: /,/
11411
- }
11412
- }
11413
- });
11477
+ var firestoreSecurityRules_1;
11478
+ var hasRequiredFirestoreSecurityRules;
11479
+
11480
+ function requireFirestoreSecurityRules () {
11481
+ if (hasRequiredFirestoreSecurityRules) return firestoreSecurityRules_1;
11482
+ hasRequiredFirestoreSecurityRules = 1;
11483
+
11484
+ firestoreSecurityRules_1 = firestoreSecurityRules;
11485
+ firestoreSecurityRules.displayName = 'firestoreSecurityRules';
11486
+ firestoreSecurityRules.aliases = [];
11487
+ function firestoreSecurityRules(Prism) {
11488
+ Prism.languages['firestore-security-rules'] = Prism.languages.extend(
11489
+ 'clike',
11490
+ {
11491
+ comment: /\/\/.*/,
11492
+ keyword:
11493
+ /\b(?:allow|function|if|match|null|return|rules_version|service)\b/,
11494
+ operator: /&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/
11495
+ }
11496
+ );
11497
+ delete Prism.languages['firestore-security-rules']['class-name'];
11498
+ Prism.languages.insertBefore('firestore-security-rules', 'keyword', {
11499
+ path: {
11500
+ pattern:
11501
+ /(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,
11502
+ lookbehind: true,
11503
+ greedy: true,
11504
+ inside: {
11505
+ variable: {
11506
+ pattern: /\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,
11507
+ inside: {
11508
+ operator: /=/,
11509
+ keyword: /\*\*/,
11510
+ punctuation: /[.$(){}]/
11511
+ }
11512
+ },
11513
+ punctuation: /\//
11514
+ }
11515
+ },
11516
+ method: {
11517
+ // to make the pattern shorter, the actual method names are omitted
11518
+ pattern: /(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,
11519
+ lookbehind: true,
11520
+ alias: 'builtin',
11521
+ inside: {
11522
+ punctuation: /,/
11523
+ }
11524
+ }
11525
+ });
11526
+ }
11527
+ return firestoreSecurityRules_1;
11414
11528
  }
11415
11529
 
11416
- var flow_1 = flow;
11417
- flow.displayName = 'flow';
11418
- flow.aliases = [];
11419
- function flow(Prism) {
11530
+ var flow_1;
11531
+ var hasRequiredFlow;
11532
+
11533
+ function requireFlow () {
11534
+ if (hasRequiredFlow) return flow_1;
11535
+ hasRequiredFlow = 1;
11536
+
11537
+ flow_1 = flow;
11538
+ flow.displayName = 'flow';
11539
+ flow.aliases = [];
11540
+ function flow(Prism) {
11420
11541
  (function (Prism) {
11421
- Prism.languages.flow = Prism.languages.extend('javascript', {});
11422
- Prism.languages.insertBefore('flow', 'keyword', {
11423
- type: [
11424
- {
11425
- pattern:
11426
- /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
11427
- alias: 'tag'
11428
- }
11429
- ]
11430
- });
11431
- Prism.languages.flow['function-variable'].pattern =
11432
- /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i;
11433
- delete Prism.languages.flow['parameter'];
11434
- Prism.languages.insertBefore('flow', 'operator', {
11435
- 'flow-punctuation': {
11436
- pattern: /\{\||\|\}/,
11437
- alias: 'punctuation'
11438
- }
11439
- });
11440
- if (!Array.isArray(Prism.languages.flow.keyword)) {
11441
- Prism.languages.flow.keyword = [Prism.languages.flow.keyword];
11442
- }
11443
- Prism.languages.flow.keyword.unshift(
11444
- {
11445
- pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
11446
- lookbehind: true
11447
- },
11448
- {
11449
- pattern:
11450
- /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,
11451
- lookbehind: true
11452
- }
11453
- );
11454
- })(Prism);
11542
+ Prism.languages.flow = Prism.languages.extend('javascript', {});
11543
+ Prism.languages.insertBefore('flow', 'keyword', {
11544
+ type: [
11545
+ {
11546
+ pattern:
11547
+ /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,
11548
+ alias: 'tag'
11549
+ }
11550
+ ]
11551
+ });
11552
+ Prism.languages.flow['function-variable'].pattern =
11553
+ /(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i;
11554
+ delete Prism.languages.flow['parameter'];
11555
+ Prism.languages.insertBefore('flow', 'operator', {
11556
+ 'flow-punctuation': {
11557
+ pattern: /\{\||\|\}/,
11558
+ alias: 'punctuation'
11559
+ }
11560
+ });
11561
+ if (!Array.isArray(Prism.languages.flow.keyword)) {
11562
+ Prism.languages.flow.keyword = [Prism.languages.flow.keyword];
11563
+ }
11564
+ Prism.languages.flow.keyword.unshift(
11565
+ {
11566
+ pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,
11567
+ lookbehind: true
11568
+ },
11569
+ {
11570
+ pattern:
11571
+ /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,
11572
+ lookbehind: true
11573
+ }
11574
+ );
11575
+ })(Prism);
11576
+ }
11577
+ return flow_1;
11455
11578
  }
11456
11579
 
11457
- var fortran_1 = fortran;
11458
- fortran.displayName = 'fortran';
11459
- fortran.aliases = [];
11460
- function fortran(Prism) {
11461
- Prism.languages.fortran = {
11462
- 'quoted-number': {
11463
- pattern: /[BOZ](['"])[A-F0-9]+\1/i,
11464
- alias: 'number'
11465
- },
11466
- string: {
11467
- pattern:
11468
- /(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,
11469
- inside: {
11470
- comment: {
11471
- pattern: /(&(?:\r\n?|\n)\s*)!.*/,
11472
- lookbehind: true
11473
- }
11474
- }
11475
- },
11476
- comment: {
11477
- pattern: /!.*/,
11478
- greedy: true
11479
- },
11480
- boolean: /\.(?:FALSE|TRUE)\.(?:_\w+)?/i,
11481
- number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,
11482
- keyword: [
11483
- // Types
11484
- /\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i, // END statements
11485
- /\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i, // Statements
11486
- /\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i, // Others
11487
- /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i
11488
- ],
11489
- operator: [
11490
- /\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,
11491
- {
11492
- // Use lookbehind to prevent confusion with (/ /)
11493
- pattern: /(^|(?!\().)\/(?!\))/,
11494
- lookbehind: true
11495
- }
11496
- ],
11497
- punctuation: /\(\/|\/\)|[(),;:&]/
11498
- };
11499
- }
11580
+ var fortran_1;
11581
+ var hasRequiredFortran;
11500
11582
 
11501
- var fsharp_1 = fsharp;
11502
- fsharp.displayName = 'fsharp';
11503
- fsharp.aliases = [];
11504
- function fsharp(Prism) {
11505
- Prism.languages.fsharp = Prism.languages.extend('clike', {
11506
- comment: [
11507
- {
11508
- pattern: /(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,
11509
- lookbehind: true,
11510
- greedy: true
11511
- },
11512
- {
11513
- pattern: /(^|[^\\:])\/\/.*/,
11514
- lookbehind: true,
11515
- greedy: true
11516
- }
11517
- ],
11518
- string: {
11519
- pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,
11520
- greedy: true
11521
- },
11522
- 'class-name': {
11523
- pattern:
11524
- /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,
11525
- lookbehind: true,
11526
- inside: {
11527
- operator: /->|\*/,
11528
- punctuation: /\./
11529
- }
11530
- },
11531
- keyword:
11532
- /\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,
11533
- number: [
11534
- /\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,
11535
- /\b0b[01]+(?:uy|y)?\b/,
11536
- /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,
11537
- /\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/
11538
- ],
11539
- operator:
11540
- /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/
11541
- });
11542
- Prism.languages.insertBefore('fsharp', 'keyword', {
11543
- preprocessor: {
11544
- pattern: /(^[\t ]*)#.*/m,
11545
- lookbehind: true,
11546
- alias: 'property',
11547
- inside: {
11548
- directive: {
11549
- pattern: /(^#)\b(?:else|endif|if|light|line|nowarn)\b/,
11550
- lookbehind: true,
11551
- alias: 'keyword'
11552
- }
11553
- }
11554
- }
11555
- });
11556
- Prism.languages.insertBefore('fsharp', 'punctuation', {
11557
- 'computation-expression': {
11558
- pattern: /\b[_a-z]\w*(?=\s*\{)/i,
11559
- alias: 'keyword'
11560
- }
11561
- });
11562
- Prism.languages.insertBefore('fsharp', 'string', {
11563
- annotation: {
11564
- pattern: /\[<.+?>\]/,
11565
- greedy: true,
11566
- inside: {
11567
- punctuation: /^\[<|>\]$/,
11568
- 'class-name': {
11569
- pattern: /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,
11570
- lookbehind: true
11571
- },
11572
- 'annotation-content': {
11573
- pattern: /[\s\S]+/,
11574
- inside: Prism.languages.fsharp
11575
- }
11576
- }
11577
- },
11578
- char: {
11579
- pattern:
11580
- /'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,
11581
- greedy: true
11582
- }
11583
- });
11583
+ function requireFortran () {
11584
+ if (hasRequiredFortran) return fortran_1;
11585
+ hasRequiredFortran = 1;
11586
+
11587
+ fortran_1 = fortran;
11588
+ fortran.displayName = 'fortran';
11589
+ fortran.aliases = [];
11590
+ function fortran(Prism) {
11591
+ Prism.languages.fortran = {
11592
+ 'quoted-number': {
11593
+ pattern: /[BOZ](['"])[A-F0-9]+\1/i,
11594
+ alias: 'number'
11595
+ },
11596
+ string: {
11597
+ pattern:
11598
+ /(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,
11599
+ inside: {
11600
+ comment: {
11601
+ pattern: /(&(?:\r\n?|\n)\s*)!.*/,
11602
+ lookbehind: true
11603
+ }
11604
+ }
11605
+ },
11606
+ comment: {
11607
+ pattern: /!.*/,
11608
+ greedy: true
11609
+ },
11610
+ boolean: /\.(?:FALSE|TRUE)\.(?:_\w+)?/i,
11611
+ number: /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,
11612
+ keyword: [
11613
+ // Types
11614
+ /\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i, // END statements
11615
+ /\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i, // Statements
11616
+ /\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i, // Others
11617
+ /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i
11618
+ ],
11619
+ operator: [
11620
+ /\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,
11621
+ {
11622
+ // Use lookbehind to prevent confusion with (/ /)
11623
+ pattern: /(^|(?!\().)\/(?!\))/,
11624
+ lookbehind: true
11625
+ }
11626
+ ],
11627
+ punctuation: /\(\/|\/\)|[(),;:&]/
11628
+ };
11629
+ }
11630
+ return fortran_1;
11631
+ }
11632
+
11633
+ var fsharp_1;
11634
+ var hasRequiredFsharp;
11635
+
11636
+ function requireFsharp () {
11637
+ if (hasRequiredFsharp) return fsharp_1;
11638
+ hasRequiredFsharp = 1;
11639
+
11640
+ fsharp_1 = fsharp;
11641
+ fsharp.displayName = 'fsharp';
11642
+ fsharp.aliases = [];
11643
+ function fsharp(Prism) {
11644
+ Prism.languages.fsharp = Prism.languages.extend('clike', {
11645
+ comment: [
11646
+ {
11647
+ pattern: /(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,
11648
+ lookbehind: true,
11649
+ greedy: true
11650
+ },
11651
+ {
11652
+ pattern: /(^|[^\\:])\/\/.*/,
11653
+ lookbehind: true,
11654
+ greedy: true
11655
+ }
11656
+ ],
11657
+ string: {
11658
+ pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,
11659
+ greedy: true
11660
+ },
11661
+ 'class-name': {
11662
+ pattern:
11663
+ /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,
11664
+ lookbehind: true,
11665
+ inside: {
11666
+ operator: /->|\*/,
11667
+ punctuation: /\./
11668
+ }
11669
+ },
11670
+ keyword:
11671
+ /\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,
11672
+ number: [
11673
+ /\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,
11674
+ /\b0b[01]+(?:uy|y)?\b/,
11675
+ /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,
11676
+ /\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/
11677
+ ],
11678
+ operator:
11679
+ /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/
11680
+ });
11681
+ Prism.languages.insertBefore('fsharp', 'keyword', {
11682
+ preprocessor: {
11683
+ pattern: /(^[\t ]*)#.*/m,
11684
+ lookbehind: true,
11685
+ alias: 'property',
11686
+ inside: {
11687
+ directive: {
11688
+ pattern: /(^#)\b(?:else|endif|if|light|line|nowarn)\b/,
11689
+ lookbehind: true,
11690
+ alias: 'keyword'
11691
+ }
11692
+ }
11693
+ }
11694
+ });
11695
+ Prism.languages.insertBefore('fsharp', 'punctuation', {
11696
+ 'computation-expression': {
11697
+ pattern: /\b[_a-z]\w*(?=\s*\{)/i,
11698
+ alias: 'keyword'
11699
+ }
11700
+ });
11701
+ Prism.languages.insertBefore('fsharp', 'string', {
11702
+ annotation: {
11703
+ pattern: /\[<.+?>\]/,
11704
+ greedy: true,
11705
+ inside: {
11706
+ punctuation: /^\[<|>\]$/,
11707
+ 'class-name': {
11708
+ pattern: /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,
11709
+ lookbehind: true
11710
+ },
11711
+ 'annotation-content': {
11712
+ pattern: /[\s\S]+/,
11713
+ inside: Prism.languages.fsharp
11714
+ }
11715
+ }
11716
+ },
11717
+ char: {
11718
+ pattern:
11719
+ /'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,
11720
+ greedy: true
11721
+ }
11722
+ });
11723
+ }
11724
+ return fsharp_1;
11584
11725
  }
11585
11726
 
11586
11727
  var ftl_1;
@@ -11785,98 +11926,125 @@ function requireGap () {
11785
11926
  return gap_1;
11786
11927
  }
11787
11928
 
11788
- var gcode_1 = gcode;
11789
- gcode.displayName = 'gcode';
11790
- gcode.aliases = [];
11791
- function gcode(Prism) {
11792
- Prism.languages.gcode = {
11793
- comment: /;.*|\B\(.*?\)\B/,
11794
- string: {
11795
- pattern: /"(?:""|[^"])*"/,
11796
- greedy: true
11797
- },
11798
- keyword: /\b[GM]\d+(?:\.\d+)?\b/,
11799
- property: /\b[A-Z]/,
11800
- checksum: {
11801
- pattern: /(\*)\d+/,
11802
- lookbehind: true,
11803
- alias: 'number'
11804
- },
11805
- // T0:0:0
11806
- punctuation: /[:*]/
11807
- };
11929
+ var gcode_1;
11930
+ var hasRequiredGcode;
11931
+
11932
+ function requireGcode () {
11933
+ if (hasRequiredGcode) return gcode_1;
11934
+ hasRequiredGcode = 1;
11935
+
11936
+ gcode_1 = gcode;
11937
+ gcode.displayName = 'gcode';
11938
+ gcode.aliases = [];
11939
+ function gcode(Prism) {
11940
+ Prism.languages.gcode = {
11941
+ comment: /;.*|\B\(.*?\)\B/,
11942
+ string: {
11943
+ pattern: /"(?:""|[^"])*"/,
11944
+ greedy: true
11945
+ },
11946
+ keyword: /\b[GM]\d+(?:\.\d+)?\b/,
11947
+ property: /\b[A-Z]/,
11948
+ checksum: {
11949
+ pattern: /(\*)\d+/,
11950
+ lookbehind: true,
11951
+ alias: 'number'
11952
+ },
11953
+ // T0:0:0
11954
+ punctuation: /[:*]/
11955
+ };
11956
+ }
11957
+ return gcode_1;
11808
11958
  }
11809
11959
 
11810
- var gdscript_1 = gdscript;
11811
- gdscript.displayName = 'gdscript';
11812
- gdscript.aliases = [];
11813
- function gdscript(Prism) {
11814
- Prism.languages.gdscript = {
11815
- comment: /#.*/,
11816
- string: {
11817
- pattern:
11818
- /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,
11819
- greedy: true
11820
- },
11821
- 'class-name': {
11822
- // class_name Foo, extends Bar, class InnerClass
11823
- // export(int) var baz, export(int, 0) var i
11824
- // as Node
11825
- // const FOO: int = 9, var bar: bool = true
11826
- // func add(reference: Item, amount: int) -> Item:
11827
- pattern:
11828
- /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,
11829
- lookbehind: true
11830
- },
11831
- keyword:
11832
- /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,
11833
- function: /\b[a-z_]\w*(?=[ \t]*\()/i,
11834
- variable: /\$\w+/,
11835
- number: [
11836
- /\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,
11837
- /\b(?:INF|NAN|PI|TAU)\b/
11838
- ],
11839
- constant: /\b[A-Z][A-Z_\d]*\b/,
11840
- boolean: /\b(?:false|true)\b/,
11841
- operator: /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,
11842
- punctuation: /[.:,;()[\]{}]/
11843
- };
11960
+ var gdscript_1;
11961
+ var hasRequiredGdscript;
11962
+
11963
+ function requireGdscript () {
11964
+ if (hasRequiredGdscript) return gdscript_1;
11965
+ hasRequiredGdscript = 1;
11966
+
11967
+ gdscript_1 = gdscript;
11968
+ gdscript.displayName = 'gdscript';
11969
+ gdscript.aliases = [];
11970
+ function gdscript(Prism) {
11971
+ Prism.languages.gdscript = {
11972
+ comment: /#.*/,
11973
+ string: {
11974
+ pattern:
11975
+ /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,
11976
+ greedy: true
11977
+ },
11978
+ 'class-name': {
11979
+ // class_name Foo, extends Bar, class InnerClass
11980
+ // export(int) var baz, export(int, 0) var i
11981
+ // as Node
11982
+ // const FOO: int = 9, var bar: bool = true
11983
+ // func add(reference: Item, amount: int) -> Item:
11984
+ pattern:
11985
+ /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,
11986
+ lookbehind: true
11987
+ },
11988
+ keyword:
11989
+ /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,
11990
+ function: /\b[a-z_]\w*(?=[ \t]*\()/i,
11991
+ variable: /\$\w+/,
11992
+ number: [
11993
+ /\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,
11994
+ /\b(?:INF|NAN|PI|TAU)\b/
11995
+ ],
11996
+ constant: /\b[A-Z][A-Z_\d]*\b/,
11997
+ boolean: /\b(?:false|true)\b/,
11998
+ operator: /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,
11999
+ punctuation: /[.:,;()[\]{}]/
12000
+ };
12001
+ }
12002
+ return gdscript_1;
11844
12003
  }
11845
12004
 
11846
- var gedcom_1 = gedcom;
11847
- gedcom.displayName = 'gedcom';
11848
- gedcom.aliases = [];
11849
- function gedcom(Prism) {
11850
- Prism.languages.gedcom = {
11851
- 'line-value': {
11852
- // Preceded by level, optional pointer, and tag
11853
- pattern:
11854
- /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,
11855
- lookbehind: true,
11856
- inside: {
11857
- pointer: {
11858
- pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,
11859
- alias: 'variable'
11860
- }
11861
- }
11862
- },
11863
- tag: {
11864
- // Preceded by level and optional pointer
11865
- pattern:
11866
- /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
11867
- lookbehind: true,
11868
- alias: 'string'
11869
- },
11870
- level: {
11871
- pattern: /(^[\t ]*)\d+/m,
11872
- lookbehind: true,
11873
- alias: 'number'
11874
- },
11875
- pointer: {
11876
- pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,
11877
- alias: 'variable'
11878
- }
11879
- };
12005
+ var gedcom_1;
12006
+ var hasRequiredGedcom;
12007
+
12008
+ function requireGedcom () {
12009
+ if (hasRequiredGedcom) return gedcom_1;
12010
+ hasRequiredGedcom = 1;
12011
+
12012
+ gedcom_1 = gedcom;
12013
+ gedcom.displayName = 'gedcom';
12014
+ gedcom.aliases = [];
12015
+ function gedcom(Prism) {
12016
+ Prism.languages.gedcom = {
12017
+ 'line-value': {
12018
+ // Preceded by level, optional pointer, and tag
12019
+ pattern:
12020
+ /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,
12021
+ lookbehind: true,
12022
+ inside: {
12023
+ pointer: {
12024
+ pattern: /^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,
12025
+ alias: 'variable'
12026
+ }
12027
+ }
12028
+ },
12029
+ tag: {
12030
+ // Preceded by level and optional pointer
12031
+ pattern:
12032
+ /(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,
12033
+ lookbehind: true,
12034
+ alias: 'string'
12035
+ },
12036
+ level: {
12037
+ pattern: /(^[\t ]*)\d+/m,
12038
+ lookbehind: true,
12039
+ alias: 'number'
12040
+ },
12041
+ pointer: {
12042
+ pattern: /@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,
12043
+ alias: 'variable'
12044
+ }
12045
+ };
12046
+ }
12047
+ return gedcom_1;
11880
12048
  }
11881
12049
 
11882
12050
  var gherkin_1;
@@ -12105,89 +12273,107 @@ function requireGml () {
12105
12273
  return gml_1;
12106
12274
  }
12107
12275
 
12108
- var gn_1 = gn;
12109
- gn.displayName = 'gn';
12110
- gn.aliases = ['gni'];
12111
- function gn(Prism) {
12112
- // https://gn.googlesource.com/gn/+/refs/heads/main/docs/reference.md#grammar
12113
- Prism.languages.gn = {
12114
- comment: {
12115
- pattern: /#.*/,
12116
- greedy: true
12117
- },
12118
- 'string-literal': {
12119
- pattern: /(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,
12120
- lookbehind: true,
12121
- greedy: true,
12122
- inside: {
12123
- interpolation: {
12124
- pattern:
12125
- /((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,
12126
- lookbehind: true,
12127
- inside: {
12128
- number: /^\$0x[\s\S]{2}$/,
12129
- variable: /^\$\w+$/,
12130
- 'interpolation-punctuation': {
12131
- pattern: /^\$\{|\}$/,
12132
- alias: 'punctuation'
12133
- },
12134
- expression: {
12135
- pattern: /[\s\S]+/,
12136
- inside: null // see below
12137
- }
12138
- }
12139
- },
12140
- string: /[\s\S]+/
12141
- }
12142
- },
12143
- keyword: /\b(?:else|if)\b/,
12144
- boolean: /\b(?:false|true)\b/,
12145
- 'builtin-function': {
12146
- // a few functions get special highlighting to improve readability
12147
- pattern:
12148
- /\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,
12149
- alias: 'keyword'
12150
- },
12151
- function: /\b[a-z_]\w*(?=\s*\()/i,
12152
- constant:
12153
- /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,
12154
- number: /-?\b\d+\b/,
12155
- operator: /[-+!=<>]=?|&&|\|\|/,
12156
- punctuation: /[(){}[\],.]/
12157
- };
12158
- Prism.languages.gn['string-literal'].inside['interpolation'].inside[
12159
- 'expression'
12160
- ].inside = Prism.languages.gn;
12161
- Prism.languages.gni = Prism.languages.gn;
12276
+ var gn_1;
12277
+ var hasRequiredGn;
12278
+
12279
+ function requireGn () {
12280
+ if (hasRequiredGn) return gn_1;
12281
+ hasRequiredGn = 1;
12282
+
12283
+ gn_1 = gn;
12284
+ gn.displayName = 'gn';
12285
+ gn.aliases = ['gni'];
12286
+ function gn(Prism) {
12287
+ // https://gn.googlesource.com/gn/+/refs/heads/main/docs/reference.md#grammar
12288
+ Prism.languages.gn = {
12289
+ comment: {
12290
+ pattern: /#.*/,
12291
+ greedy: true
12292
+ },
12293
+ 'string-literal': {
12294
+ pattern: /(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,
12295
+ lookbehind: true,
12296
+ greedy: true,
12297
+ inside: {
12298
+ interpolation: {
12299
+ pattern:
12300
+ /((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,
12301
+ lookbehind: true,
12302
+ inside: {
12303
+ number: /^\$0x[\s\S]{2}$/,
12304
+ variable: /^\$\w+$/,
12305
+ 'interpolation-punctuation': {
12306
+ pattern: /^\$\{|\}$/,
12307
+ alias: 'punctuation'
12308
+ },
12309
+ expression: {
12310
+ pattern: /[\s\S]+/,
12311
+ inside: null // see below
12312
+ }
12313
+ }
12314
+ },
12315
+ string: /[\s\S]+/
12316
+ }
12317
+ },
12318
+ keyword: /\b(?:else|if)\b/,
12319
+ boolean: /\b(?:false|true)\b/,
12320
+ 'builtin-function': {
12321
+ // a few functions get special highlighting to improve readability
12322
+ pattern:
12323
+ /\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,
12324
+ alias: 'keyword'
12325
+ },
12326
+ function: /\b[a-z_]\w*(?=\s*\()/i,
12327
+ constant:
12328
+ /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,
12329
+ number: /-?\b\d+\b/,
12330
+ operator: /[-+!=<>]=?|&&|\|\|/,
12331
+ punctuation: /[(){}[\],.]/
12332
+ };
12333
+ Prism.languages.gn['string-literal'].inside['interpolation'].inside[
12334
+ 'expression'
12335
+ ].inside = Prism.languages.gn;
12336
+ Prism.languages.gni = Prism.languages.gn;
12337
+ }
12338
+ return gn_1;
12162
12339
  }
12163
12340
 
12164
- var goModule_1 = goModule;
12165
- goModule.displayName = 'goModule';
12166
- goModule.aliases = [];
12167
- function goModule(Prism) {
12168
- // https://go.dev/ref/mod#go-mod-file-module
12169
- Prism.languages['go-mod'] = Prism.languages['go-module'] = {
12170
- comment: {
12171
- pattern: /\/\/.*/,
12172
- greedy: true
12173
- },
12174
- version: {
12175
- pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,
12176
- lookbehind: true,
12177
- alias: 'number'
12178
- },
12179
- 'go-version': {
12180
- pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,
12181
- lookbehind: true,
12182
- alias: 'number'
12183
- },
12184
- keyword: {
12185
- pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,
12186
- lookbehind: true
12187
- },
12188
- operator: /=>/,
12189
- punctuation: /[()[\],]/
12190
- };
12341
+ var goModule_1;
12342
+ var hasRequiredGoModule;
12343
+
12344
+ function requireGoModule () {
12345
+ if (hasRequiredGoModule) return goModule_1;
12346
+ hasRequiredGoModule = 1;
12347
+
12348
+ goModule_1 = goModule;
12349
+ goModule.displayName = 'goModule';
12350
+ goModule.aliases = [];
12351
+ function goModule(Prism) {
12352
+ // https://go.dev/ref/mod#go-mod-file-module
12353
+ Prism.languages['go-mod'] = Prism.languages['go-module'] = {
12354
+ comment: {
12355
+ pattern: /\/\/.*/,
12356
+ greedy: true
12357
+ },
12358
+ version: {
12359
+ pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,
12360
+ lookbehind: true,
12361
+ alias: 'number'
12362
+ },
12363
+ 'go-version': {
12364
+ pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,
12365
+ lookbehind: true,
12366
+ alias: 'number'
12367
+ },
12368
+ keyword: {
12369
+ pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,
12370
+ lookbehind: true
12371
+ },
12372
+ operator: /=>/,
12373
+ punctuation: /[()[\],]/
12374
+ };
12375
+ }
12376
+ return goModule_1;
12191
12377
  }
12192
12378
 
12193
12379
  var go_1;
@@ -27751,13 +27937,13 @@ refractor.register(cobol_1);
27751
27937
  refractor.register(coffeescript_1);
27752
27938
  refractor.register(concurnas_1);
27753
27939
  refractor.register(coq_1);
27754
- refractor.register(cpp_1);
27940
+ refractor.register(requireCpp());
27755
27941
  refractor.register(crystal_1);
27756
27942
  refractor.register(csharp_1);
27757
27943
  refractor.register(cshtml_1);
27758
27944
  refractor.register(csp_1);
27759
27945
  refractor.register(cssExtras_1);
27760
- refractor.register(csv_1);
27946
+ refractor.register(requireCsv());
27761
27947
  refractor.register(cypher_1);
27762
27948
  refractor.register(d_1);
27763
27949
  refractor.register(dart_1);
@@ -27768,34 +27954,34 @@ refractor.register(diff_1);
27768
27954
  refractor.register(django_1);
27769
27955
  refractor.register(dnsZoneFile_1);
27770
27956
  refractor.register(docker_1);
27771
- refractor.register(requireDot());
27957
+ refractor.register(dot_1);
27772
27958
  refractor.register(requireEbnf());
27773
- refractor.register(editorconfig_1);
27774
- refractor.register(eiffel_1);
27959
+ refractor.register(requireEditorconfig());
27960
+ refractor.register(requireEiffel());
27775
27961
  refractor.register(ejs_1);
27776
- refractor.register(elixir_1);
27777
- refractor.register(elm_1);
27778
- refractor.register(erb_1);
27779
- refractor.register(erlang_1);
27780
- refractor.register(etlua_1);
27781
- refractor.register(excelFormula_1);
27782
- refractor.register(factor_1);
27783
- refractor.register(_false);
27784
- refractor.register(firestoreSecurityRules_1);
27785
- refractor.register(flow_1);
27786
- refractor.register(fortran_1);
27787
- refractor.register(fsharp_1);
27962
+ refractor.register(requireElixir());
27963
+ refractor.register(requireElm());
27964
+ refractor.register(requireErb());
27965
+ refractor.register(requireErlang());
27966
+ refractor.register(requireEtlua());
27967
+ refractor.register(requireExcelFormula());
27968
+ refractor.register(requireFactor());
27969
+ refractor.register(require_false());
27970
+ refractor.register(requireFirestoreSecurityRules());
27971
+ refractor.register(requireFlow());
27972
+ refractor.register(requireFortran());
27973
+ refractor.register(requireFsharp());
27788
27974
  refractor.register(requireFtl());
27789
27975
  refractor.register(requireGap());
27790
- refractor.register(gcode_1);
27791
- refractor.register(gdscript_1);
27792
- refractor.register(gedcom_1);
27976
+ refractor.register(requireGcode());
27977
+ refractor.register(requireGdscript());
27978
+ refractor.register(requireGedcom());
27793
27979
  refractor.register(requireGherkin());
27794
27980
  refractor.register(requireGit());
27795
27981
  refractor.register(requireGlsl());
27796
27982
  refractor.register(requireGml());
27797
- refractor.register(gn_1);
27798
- refractor.register(goModule_1);
27983
+ refractor.register(requireGn());
27984
+ refractor.register(requireGoModule());
27799
27985
  refractor.register(requireGo());
27800
27986
  refractor.register(requireGraphql());
27801
27987
  refractor.register(requireGroovy());
@@ -27850,7 +28036,7 @@ refractor.register(requireLivescript());
27850
28036
  refractor.register(requireLlvm());
27851
28037
  refractor.register(requireLog());
27852
28038
  refractor.register(requireLolcode());
27853
- refractor.register(lua_1);
28039
+ refractor.register(requireLua());
27854
28040
  refractor.register(requireMagma());
27855
28041
  refractor.register(requireMakefile());
27856
28042
  refractor.register(requireMarkdown());
@@ -38749,6 +38935,18 @@ function escapeContentForStream(content) {
38749
38935
  }
38750
38936
 
38751
38937
  var renderTimer = null;
38938
+ /**
38939
+ * 预处理 MDX 内容,转义可能被误认为 HTML 标签的内容
38940
+ * @param content MDX 内容
38941
+ * @returns 处理后的内容
38942
+ */
38943
+ function preprocessMdxContent(content) {
38944
+ // 匹配可能被误认为 HTML 标签的模式,如 <数字、<字母但不是真正的组件标签
38945
+ // 真正的 React 组件标签应该以大写字母开头,如 <Component>
38946
+ // HTML 标签以小写字母开头,如 <div>
38947
+ // 需要排除正常的闭合标签 </Component>
38948
+ return content.replace(/<(?!\/|[A-Z][a-zA-Z]*\b|[a-z][a-zA-Z0-9]*\b)/g, '&lt;');
38949
+ }
38752
38950
  // 辅助函数:格式化props
38753
38951
  function formatProps(props) {
38754
38952
  return Object.entries(props).map(function (_a) {
@@ -38768,7 +38966,7 @@ function formatProps(props) {
38768
38966
  }
38769
38967
  function renderMdx(mdxContent, scope, registeredComponents) {
38770
38968
  return __awaiter(this, void 0, void 0, function () {
38771
- var componentTagRegex, usedComponents, match, vf, XComponent;
38969
+ var componentTagRegex, usedComponents, match, processedContent, vf, XComponent, e_1;
38772
38970
  return __generator(this, function (_a) {
38773
38971
  switch (_a.label) {
38774
38972
  case 0:
@@ -38780,7 +38978,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
38780
38978
  while ((match = componentTagRegex.exec(mdxContent)) !== null) {
38781
38979
  usedComponents.add(match[1]);
38782
38980
  }
38783
- return [4 /*yield*/, compile(mdxContent, {
38981
+ processedContent = preprocessMdxContent(mdxContent);
38982
+ return [4 /*yield*/, compile(processedContent, {
38784
38983
  outputFormat: "function-body",
38785
38984
  remarkPlugins: [[RemarkMath, {
38786
38985
  strict: true
@@ -38803,7 +39002,8 @@ function renderMdx(mdxContent, scope, registeredComponents) {
38803
39002
  scope: scope
38804
39003
  })];
38805
39004
  case 3:
38806
- _a.sent();
39005
+ e_1 = _a.sent();
39006
+ console.log(e_1, 'e');
38807
39007
  return [2 /*return*/, new Promise(function (resolve) {
38808
39008
  renderTimer = setTimeout(function () {
38809
39009
  resolve(/*#__PURE__*/React.createElement('div', {