95 lines
2.9 KiB
JavaScript
95 lines
2.9 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
|
|
* Module id: 427814
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e, t, i) => {
|
|
"use strict";
|
|
function r(e) {
|
|
var t, i, r, a;
|
|
(t = /\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source),
|
|
(i = /(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(
|
|
/<braces>/g,
|
|
function () {
|
|
return t;
|
|
},
|
|
)),
|
|
(r = e.languages.pascaligo =
|
|
{
|
|
comment: /\(\*[\s\S]+?\*\)|\/\/.*/,
|
|
string: {
|
|
pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,
|
|
greedy: !0,
|
|
},
|
|
"class-name": [
|
|
{
|
|
pattern: RegExp(
|
|
/(\btype\s+\w+\s+is\s+)<type>/.source.replace(
|
|
/<type>/g,
|
|
function () {
|
|
return i;
|
|
},
|
|
),
|
|
"i",
|
|
),
|
|
lookbehind: !0,
|
|
inside: null,
|
|
},
|
|
{
|
|
pattern: RegExp(
|
|
/<type>(?=\s+is\b)/.source.replace(/<type>/g, function () {
|
|
return i;
|
|
}),
|
|
"i",
|
|
),
|
|
inside: null,
|
|
},
|
|
{
|
|
pattern: RegExp(
|
|
/(:\s*)<type>/.source.replace(/<type>/g, function () {
|
|
return i;
|
|
}),
|
|
),
|
|
lookbehind: !0,
|
|
inside: null,
|
|
},
|
|
],
|
|
keyword: {
|
|
pattern:
|
|
/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,
|
|
lookbehind: !0,
|
|
},
|
|
boolean: { pattern: /(^|[^&])\b(?:False|True)\b/i, lookbehind: !0 },
|
|
builtin: {
|
|
pattern:
|
|
/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,
|
|
lookbehind: !0,
|
|
},
|
|
function: /\b\w+(?=\s*\()/,
|
|
number: [
|
|
/%[01]+|&[0-7]+|\$[a-f\d]+/i,
|
|
/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i,
|
|
],
|
|
operator:
|
|
/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,
|
|
punctuation: /\(\.|\.\)|[()\[\]:;,.{}]/,
|
|
}),
|
|
(a = [
|
|
"comment",
|
|
"keyword",
|
|
"builtin",
|
|
"operator",
|
|
"punctuation",
|
|
].reduce(function (e, t) {
|
|
return (e[t] = r[t]), e;
|
|
}, {})),
|
|
r["class-name"].forEach(function (e) {
|
|
e.inside = a;
|
|
});
|
|
}
|
|
(t.exports = r), (r.displayName = "pascaligo"), (r.aliases = []);
|
|
};
|
|
|
|
export default moduleFactory;
|