vue-files-preview-inno
Version:
A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.
159 lines (158 loc) • 3.42 kB
JavaScript
var n, t;
function s() {
if (t) return n;
t = 1;
function r(e) {
const a = {
keyword: [
"break",
"case",
"chan",
"const",
"continue",
"default",
"defer",
"else",
"fallthrough",
"for",
"func",
"go",
"goto",
"if",
"import",
"interface",
"map",
"package",
"range",
"return",
"select",
"struct",
"switch",
"type",
"var"
],
type: [
"bool",
"byte",
"complex64",
"complex128",
"error",
"float32",
"float64",
"int8",
"int16",
"int32",
"int64",
"string",
"uint8",
"uint16",
"uint32",
"uint64",
"int",
"uint",
"uintptr",
"rune"
],
literal: [
"true",
"false",
"iota",
"nil"
],
built_in: [
"append",
"cap",
"close",
"complex",
"copy",
"imag",
"len",
"make",
"new",
"panic",
"print",
"println",
"real",
"recover",
"delete"
]
};
return {
name: "Go",
aliases: ["golang"],
keywords: a,
illegal: "</",
contains: [
e.C_LINE_COMMENT_MODE,
e.C_BLOCK_COMMENT_MODE,
{
className: "string",
variants: [
e.QUOTE_STRING_MODE,
e.APOS_STRING_MODE,
{
begin: "`",
end: "`"
}
]
},
{
className: "number",
variants: [
{
match: /-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,
// hex without a present digit before . (making a digit afterwards required)
relevance: 0
},
{
match: /-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
// hex with a present digit before . (making a digit afterwards optional)
relevance: 0
},
{
match: /-?\b0[oO](_?[0-7])*i?/,
// leading 0o octal
relevance: 0
},
{
match: /-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,
// decimal without a present digit before . (making a digit afterwards required)
relevance: 0
},
{
match: /-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
// decimal with a present digit before . (making a digit afterwards optional)
relevance: 0
}
]
},
{
begin: /:=/
// relevance booster
},
{
className: "function",
beginKeywords: "func",
end: "\\s*(\\{|$)",
excludeEnd: !0,
contains: [
e.TITLE_MODE,
{
className: "params",
begin: /\(/,
end: /\)/,
endsParent: !0,
keywords: a,
illegal: /["']/
}
]
}
]
};
}
return n = r, n;
}
export {
s as __require
};
//# sourceMappingURL=go.mjs.map