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