83 lines
3.2 KiB
JavaScript
83 lines
3.2 KiB
JavaScript
/*
|
|
* Extracted from browser-delivered Turbopack chunk: 939e07c76f4b30f0.294c1bf0d6.js
|
|
* Module id: 968004
|
|
* For reading/searching only; this factory depends on the original Turbopack runtime.
|
|
*/
|
|
|
|
const moduleFactory = (e, t, i) => {
|
|
"use strict";
|
|
function r(e) {
|
|
var t;
|
|
(t = { pattern: /[\s\S]+/, inside: null }),
|
|
(e.languages.v = e.languages.extend("clike", {
|
|
string: {
|
|
pattern: /r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
|
|
alias: "quoted-string",
|
|
greedy: !0,
|
|
inside: {
|
|
interpolation: {
|
|
pattern:
|
|
/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,
|
|
lookbehind: !0,
|
|
inside: {
|
|
"interpolation-variable": {
|
|
pattern: /^\$\w[\s\S]*$/,
|
|
alias: "variable",
|
|
},
|
|
"interpolation-punctuation": {
|
|
pattern: /^\$\{|\}$/,
|
|
alias: "punctuation",
|
|
},
|
|
"interpolation-expression": t,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
"class-name": {
|
|
pattern: /(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,
|
|
lookbehind: !0,
|
|
},
|
|
keyword:
|
|
/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,
|
|
number:
|
|
/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,
|
|
operator:
|
|
/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,
|
|
builtin:
|
|
/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/,
|
|
})),
|
|
(t.inside = e.languages.v),
|
|
e.languages.insertBefore("v", "string", {
|
|
char: { pattern: /`(?:\\`|\\?[^`]{1,2})`/, alias: "rune" },
|
|
}),
|
|
e.languages.insertBefore("v", "operator", {
|
|
attribute: {
|
|
pattern:
|
|
/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,
|
|
lookbehind: !0,
|
|
alias: "annotation",
|
|
inside: { punctuation: /[\[\]]/, keyword: /\w+/ },
|
|
},
|
|
generic: {
|
|
pattern: /<\w+>(?=\s*[\)\{])/,
|
|
inside: { punctuation: /[<>]/, "class-name": /\w+/ },
|
|
},
|
|
}),
|
|
e.languages.insertBefore("v", "function", {
|
|
"generic-function": {
|
|
pattern: /\b\w+\s*<\w+>(?=\()/,
|
|
inside: {
|
|
function: /^\w+/,
|
|
generic: {
|
|
pattern: /<\w+>/,
|
|
inside: e.languages.v.generic.inside,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|
|
(t.exports = r), (r.displayName = "v"), (r.aliases = []);
|
|
};
|
|
|
|
export default moduleFactory;
|