98 lines
3.5 KiB
JavaScript
98 lines
3.5 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
|
|
* Module id: 983484
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e, t, i) => {
|
|
"use strict";
|
|
function r(e) {
|
|
!(function (e) {
|
|
function t(e, t) {
|
|
return e.replace(/<<(\d+)>>/g, function (e, i) {
|
|
return "(?:" + t[+i] + ")";
|
|
});
|
|
}
|
|
function i(e, i, r) {
|
|
return RegExp(t(e, i), r || "");
|
|
}
|
|
var r = RegExp(
|
|
"\\b(?:" +
|
|
"Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within"
|
|
.trim()
|
|
.replace(/ /g, "|") +
|
|
")\\b",
|
|
),
|
|
a = /\b[A-Za-z_]\w*\b/.source,
|
|
n = t(/<<0>>(?:\s*\.\s*<<0>>)*/.source, [a]),
|
|
A = { keyword: r, punctuation: /[<>()?,.:[\]]/ },
|
|
s = /"(?:\\.|[^\\"])*"/.source;
|
|
(e.languages.qsharp = e.languages.extend("clike", {
|
|
comment: /\/\/.*/,
|
|
string: [
|
|
{
|
|
pattern: i(/(^|[^$\\])<<0>>/.source, [s]),
|
|
lookbehind: !0,
|
|
greedy: !0,
|
|
},
|
|
],
|
|
"class-name": [
|
|
{
|
|
pattern: i(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source, [
|
|
n,
|
|
]),
|
|
lookbehind: !0,
|
|
inside: A,
|
|
},
|
|
{
|
|
pattern: i(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source, [n]),
|
|
lookbehind: !0,
|
|
inside: A,
|
|
},
|
|
],
|
|
keyword: r,
|
|
number:
|
|
/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,
|
|
operator:
|
|
/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,
|
|
punctuation: /::|[{}[\];(),.:]/,
|
|
})),
|
|
e.languages.insertBefore("qsharp", "number", {
|
|
range: { pattern: /\.\./, alias: "operator" },
|
|
});
|
|
var o = (function (e, t) {
|
|
for (var i = 0; i < 2; i++)
|
|
e = e.replace(/<<self>>/g, function () {
|
|
return "(?:" + e + ")";
|
|
});
|
|
return e.replace(/<<self>>/g, "[^\\s\\S]");
|
|
})(t(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source, [s]), 0);
|
|
e.languages.insertBefore("qsharp", "string", {
|
|
"interpolation-string": {
|
|
pattern: i(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source, [o]),
|
|
greedy: !0,
|
|
inside: {
|
|
interpolation: {
|
|
pattern: i(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source, [o]),
|
|
lookbehind: !0,
|
|
inside: {
|
|
punctuation: /^\{|\}$/,
|
|
expression: {
|
|
pattern: /[\s\S]+/,
|
|
alias: "language-qsharp",
|
|
inside: e.languages.qsharp,
|
|
},
|
|
},
|
|
},
|
|
string: /[\s\S]+/,
|
|
},
|
|
},
|
|
});
|
|
})(e),
|
|
(e.languages.qs = e.languages.qsharp);
|
|
}
|
|
(t.exports = r), (r.displayName = "qsharp"), (r.aliases = ["qs"]);
|
|
};
|
|
|
|
export default moduleFactory;
|