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