82 lines
2.8 KiB
JavaScript
82 lines
2.8 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
|
|
* Module id: 794321
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e, t, i) => {
|
|
"use strict";
|
|
var r = e.r(916033);
|
|
function a(e) {
|
|
var t, i;
|
|
e.register(r),
|
|
(t = /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/),
|
|
(i = /\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/),
|
|
(e.languages.soy = {
|
|
comment: [
|
|
/\/\*[\s\S]*?\*\//,
|
|
{ pattern: /(\s)\/\/.*/, lookbehind: !0, greedy: !0 },
|
|
],
|
|
"command-arg": {
|
|
pattern:
|
|
/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,
|
|
lookbehind: !0,
|
|
alias: "string",
|
|
inside: { punctuation: /\./ },
|
|
},
|
|
parameter: {
|
|
pattern: /(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,
|
|
lookbehind: !0,
|
|
alias: "variable",
|
|
},
|
|
keyword: [
|
|
{
|
|
pattern:
|
|
/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,
|
|
lookbehind: !0,
|
|
},
|
|
/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/,
|
|
],
|
|
delimiter: { pattern: /^\{+\/?|\/?\}+$/, alias: "punctuation" },
|
|
property: /\w+(?==)/,
|
|
variable: {
|
|
pattern: /\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,
|
|
inside: {
|
|
string: { pattern: t, greedy: !0 },
|
|
number: i,
|
|
punctuation: /[\[\].?]/,
|
|
},
|
|
},
|
|
string: { pattern: t, greedy: !0 },
|
|
function: [
|
|
/\w+(?=\()/,
|
|
{ pattern: /(\|[^\S\r\n]*)\w+/, lookbehind: !0 },
|
|
],
|
|
boolean: /\b(?:false|true)\b/,
|
|
number: i,
|
|
operator: /\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,
|
|
punctuation: /[{}()\[\]|.,:]/,
|
|
}),
|
|
e.hooks.add("before-tokenize", function (t) {
|
|
var i = !1;
|
|
e.languages["markup-templating"].buildPlaceholders(
|
|
t,
|
|
"soy",
|
|
/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,
|
|
function (e) {
|
|
return (
|
|
"{/literal}" === e && (i = !1),
|
|
!i && ("{literal}" === e && (i = !0), !0)
|
|
);
|
|
},
|
|
);
|
|
}),
|
|
e.hooks.add("after-tokenize", function (t) {
|
|
e.languages["markup-templating"].tokenizePlaceholders(t, "soy");
|
|
});
|
|
}
|
|
(t.exports = a), (a.displayName = "soy"), (a.aliases = []);
|
|
};
|
|
|
|
export default moduleFactory;
|