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.

247 lines (246 loc) 5.65 kB
var c, E; function C() { if (E) return c; E = 1; var n = "[0-9](_*[0-9])*", t = `\\.(${n})`, r = "[0-9a-fA-F](_*[0-9a-fA-F])*", o = { className: "number", variants: [ // DecimalFloatingPointLiteral // including ExponentPart { begin: `(\\b(${n})((${t})|\\.)?|(${t}))[eE][+-]?(${n})[fFdD]?\\b` }, // excluding ExponentPart { begin: `\\b(${n})((${t})[fFdD]?\\b|\\.([fFdD]\\b)?)` }, { begin: `(${t})[fFdD]?\\b` }, { begin: `\\b(${n})[fFdD]\\b` }, // HexadecimalFloatingPointLiteral { begin: `\\b0[xX]((${r})\\.?|(${r})?\\.(${r}))[pP][+-]?(${n})[fFdD]?\\b` }, // DecimalIntegerLiteral { begin: "\\b(0|[1-9](_*[0-9])*)[lL]?\\b" }, // HexIntegerLiteral { begin: `\\b0[xX](${r})[lL]?\\b` }, // OctalIntegerLiteral { begin: "\\b0(_*[0-7])*[lL]?\\b" }, // BinaryIntegerLiteral { begin: "\\b0[bB][01](_*[01])*[lL]?\\b" } ], relevance: 0 }; function _(e, s, a) { return a === -1 ? "" : e.replace(s, (b) => _(e, s, a - 1)); } function N(e) { const s = e.regex, a = "[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*", b = a + _("(?:<" + a + "~~~(?:\\s*,\\s*" + a + "~~~)*>)?", /~~~/g, 2), i = { keyword: [ "synchronized", "abstract", "private", "var", "static", "if", "const ", "for", "while", "strictfp", "finally", "protected", "import", "native", "final", "void", "enum", "else", "break", "transient", "catch", "instanceof", "volatile", "case", "assert", "package", "default", "public", "try", "switch", "continue", "throws", "protected", "public", "private", "module", "requires", "exports", "do", "sealed", "yield", "permits", "goto" ], literal: [ "false", "true", "null" ], type: [ "char", "boolean", "long", "float", "int", "byte", "short", "double" ], built_in: [ "super", "this" ] }, l = { className: "meta", begin: "@" + a, contains: [ { begin: /\(/, end: /\)/, contains: ["self"] // allow nested () inside our annotation } ] }, d = { className: "params", begin: /\(/, end: /\)/, keywords: i, relevance: 0, contains: [e.C_BLOCK_COMMENT_MODE], endsParent: !0 }; return { name: "Java", aliases: ["jsp"], keywords: i, illegal: /<\/|#/, contains: [ e.COMMENT( "/\\*\\*", "\\*/", { relevance: 0, contains: [ { // eat up @'s in emails to prevent them to be recognized as doctags begin: /\w+@/, relevance: 0 }, { className: "doctag", begin: "@[A-Za-z]+" } ] } ), // relevance boost { begin: /import java\.[a-z]+\./, keywords: "import", relevance: 2 }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE, { begin: /"""/, end: /"""/, className: "string", contains: [e.BACKSLASH_ESCAPE] }, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, { match: [ /\b(?:class|interface|enum|extends|implements|new)/, /\s+/, a ], className: { 1: "keyword", 3: "title.class" } }, { // Exceptions for hyphenated keywords match: /non-sealed/, scope: "keyword" }, { begin: [ s.concat(/(?!else)/, a), /\s+/, a, /\s+/, /=(?!=)/ ], className: { 1: "type", 3: "variable", 5: "operator" } }, { begin: [ /record/, /\s+/, a ], className: { 1: "keyword", 3: "title.class" }, contains: [ d, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE ] }, { // Expression keywords prevent 'keyword Name(...)' from being // recognized as a function definition beginKeywords: "new throw return else", relevance: 0 }, { begin: [ "(?:" + b + "\\s+)", e.UNDERSCORE_IDENT_RE, /\s*(?=\()/ ], className: { 2: "title.function" }, keywords: i, contains: [ { className: "params", begin: /\(/, end: /\)/, keywords: i, relevance: 0, contains: [ l, e.APOS_STRING_MODE, e.QUOTE_STRING_MODE, o, e.C_BLOCK_COMMENT_MODE ] }, e.C_LINE_COMMENT_MODE, e.C_BLOCK_COMMENT_MODE ] }, o, l ] }; } return c = N, c; } export { C as __require }; //# sourceMappingURL=java.mjs.map