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