UNPKG

vue-files-preview-inno

Version:

A tool for previewing files such as doc, excel, pdf, image, markdown, txt, audio, and video and so on.

139 lines (138 loc) 3.45 kB
var r, l; function g() { if (l) return r; l = 1; function u(e) { const n = { keyword: ( // Moonscript keywords "if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using" ), literal: "true false nil", built_in: "_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table" }, t = "[A-Za-z$_][0-9A-Za-z$_]*", s = { className: "subst", begin: /#\{/, end: /\}/, keywords: n }, a = [ e.inherit( e.C_NUMBER_MODE, { starts: { end: "(\\s*/)?", relevance: 0 } } ), // a number tries to eat the following slash to prevent treating it as a regexp { className: "string", variants: [ { begin: /'/, end: /'/, contains: [e.BACKSLASH_ESCAPE] }, { begin: /"/, end: /"/, contains: [ e.BACKSLASH_ESCAPE, s ] } ] }, { className: "built_in", begin: "@__" + e.IDENT_RE }, { begin: "@" + e.IDENT_RE // relevance booster on par with CoffeeScript }, { begin: e.IDENT_RE + "\\\\" + e.IDENT_RE // inst\method } ]; s.contains = a; const i = e.inherit(e.TITLE_MODE, { begin: t }), o = "(\\(.*\\)\\s*)?\\B[-=]>", c = { className: "params", begin: "\\([^\\(]", returnBegin: !0, /* We need another contained nameless mode to not have every nested pair of parens to be called "params" */ contains: [ { begin: /\(/, end: /\)/, keywords: n, contains: ["self"].concat(a) } ] }; return { name: "MoonScript", aliases: ["moon"], keywords: n, illegal: /\/\*/, contains: a.concat([ e.COMMENT("--", "$"), { className: "function", // function: -> => begin: "^\\s*" + t + "\\s*=\\s*" + o, end: "[-=]>", returnBegin: !0, contains: [ i, c ] }, { begin: /[\(,:=]\s*/, // anonymous function start relevance: 0, contains: [ { className: "function", begin: o, end: "[-=]>", returnBegin: !0, contains: [c] } ] }, { className: "class", beginKeywords: "class", end: "$", illegal: /[:="\[\]]/, contains: [ { beginKeywords: "extends", endsWithParent: !0, illegal: /[:="\[\]]/, contains: [i] }, i ] }, { className: "name", // table begin: t + ":", end: ":", returnBegin: !0, returnEnd: !0, relevance: 0 } ]) }; } return r = u, r; } export { g as __require }; //# sourceMappingURL=moonscript.mjs.map