зеркало из https://github.com/nextcloud/text.git
1 строка
6.6 KiB
Plaintext
1 строка
6.6 KiB
Plaintext
{"version":3,"file":"scala-DM40I5I8.chunk.mjs","sources":["../node_modules/highlight.js/lib/languages/scala.js"],"sourcesContent":["/*\nLanguage: Scala\nCategory: functional\nAuthor: Jan Berkel <jan.berkel@gmail.com>\nContributors: Erik Osheim <d_m@plastic-idolatry.com>\nWebsite: https://www.scala-lang.org\n*/\n\nfunction scala(hljs) {\n const regex = hljs.regex;\n const ANNOTATION = {\n className: 'meta',\n begin: '@[A-Za-z]+'\n };\n\n // used in strings for escaping/interpolation/substitution\n const SUBST = {\n className: 'subst',\n variants: [\n { begin: '\\\\$[A-Za-z0-9_]+' },\n {\n begin: /\\$\\{/,\n end: /\\}/\n }\n ]\n };\n\n const STRING = {\n className: 'string',\n variants: [\n {\n begin: '\"\"\"',\n end: '\"\"\"'\n },\n {\n begin: '\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [ hljs.BACKSLASH_ESCAPE ]\n },\n {\n begin: '[a-z]+\"',\n end: '\"',\n illegal: '\\\\n',\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST\n ]\n },\n {\n className: 'string',\n begin: '[a-z]+\"\"\"',\n end: '\"\"\"',\n contains: [ SUBST ],\n relevance: 10\n }\n ]\n\n };\n\n const TYPE = {\n className: 'type',\n begin: '\\\\b[A-Z][A-Za-z0-9_]*',\n relevance: 0\n };\n\n const NAME = {\n className: 'title',\n begin: /[^0-9\\n\\t \"'(),.`{}\\[\\]:;][^\\n\\t \"'(),.`{}\\[\\]:;]+|[^0-9\\n\\t \"'(),.`{}\\[\\]:;=]/,\n relevance: 0\n };\n\n const CLASS = {\n className: 'class',\n beginKeywords: 'class object trait type',\n end: /[:={\\[\\n;]/,\n excludeEnd: true,\n contains: [\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n {\n beginKeywords: 'extends with',\n relevance: 10\n },\n {\n begin: /\\[/,\n end: /\\]/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0,\n contains: [ \n TYPE, \n hljs.C_LINE_COMMENT_MODE, \n hljs.C_BLOCK_COMMENT_MODE, \n ]\n },\n {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true,\n relevance: 0,\n contains: [ \n TYPE, \n hljs.C_LINE_COMMENT_MODE, \n hljs.C_BLOCK_COMMENT_MODE, \n ]\n },\n NAME\n ]\n };\n\n const METHOD = {\n className: 'function',\n beginKeywords: 'def',\n end: regex.lookahead(/[:={\\[(\\n;]/),\n contains: [ NAME ]\n };\n\n const EXTENSION = {\n begin: [\n /^\\s*/, // Is first token on the line\n 'extension',\n /\\s+(?=[[(])/, // followed by at least one space and `[` or `(`\n ],\n beginScope: { 2: \"keyword\", }\n };\n\n const END = {\n begin: [\n /^\\s*/, // Is first token on the line\n /end/,\n /\\s+/,\n /(extension\\b)?/, // `extension` is the only marker that follows an `end` that cannot be captured by another rule.\n ],\n beginScope: {\n 2: \"keyword\",\n 4: \"keyword\",\n }\n };\n\n // TODO: use negative look-behind in future\n // /(?<!\\.)\\binline(?=\\s)/\n const INLINE_MODES = [\n { match: /\\.inline\\b/ },\n {\n begin: /\\binline(?=\\s)/,\n keywords: 'inline'\n }\n ];\n\n const USING_PARAM_CLAUSE = {\n begin: [\n /\\(\\s*/, // Opening `(` of a parameter or argument list\n /using/,\n /\\s+(?!\\))/, // Spaces not followed by `)`\n ],\n beginScope: { 2: \"keyword\", }\n };\n\n // glob all non-whitespace characters as a \"string\"\n // sourced from https://github.com/scala/docs.scala-lang/pull/2845\n const DIRECTIVE_VALUE = {\n className: 'string',\n begin: /\\S+/,\n };\n\n // directives\n // sourced from https://github.com/scala/docs.scala-lang/pull/2845\n const USING_DIRECTIVE = {\n begin: [\n '//>',\n /\\s+/,\n /using/,\n /\\s+/,\n /\\S+/\n ],\n beginScope: {\n 1: \"comment\",\n 3: \"keyword\",\n 5: \"type\"\n },\n end: /$/,\n contains: [\n DIRECTIVE_VALUE,\n ]\n };\n\n return {\n name: 'Scala',\n keywords: {\n literal: 'true false null',\n keyword: 'type yield lazy override def with val var sealed abstract private trait object if then forSome for while do throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit export enum given transparent'\n },\n contains: [\n USING_DIRECTIVE,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n STRING,\n TYPE,\n METHOD,\n CLASS,\n hljs.C_NUMBER_MODE,\n EXTENSION,\n END,\n ...INLINE_MODES,\n USING_PARAM_CLAUSE,\n ANNOTATION\n ]\n };\n}\n\nmodule.exports = scala;\n"],"names":["scala","hljs","regex","ANNOTATION","SUBST","STRING","TYPE","NAME","CLASS","METHOD","EXTENSION","END","INLINE_MODES","USING_PARAM_CLAUSE","scala_1"],"mappings":";4YAQA,SAASA,EAAMC,EAAM,CACnB,MAAMC,EAAQD,EAAK,MACbE,EAAa,CACjB,UAAW,OACX,MAAO,YACX,EAGQC,EAAQ,CACZ,UAAW,QACX,SAAU,CACR,CAAE,MAAO,kBAAoB,EAC7B,CACE,MAAO,OACP,IAAK,IACN,CACF,CACL,EAEQC,EAAS,CACb,UAAW,SACX,SAAU,CACR,CACE,MAAO,MACP,IAAK,KACN,EACD,CACE,MAAO,IACP,IAAK,IACL,QAAS,MACT,SAAU,CAAEJ,EAAK,gBAAkB,CACpC,EACD,CACE,MAAO,UACP,IAAK,IACL,QAAS,MACT,SAAU,CACRA,EAAK,iBACLG,CACD,CACF,EACD,CACE,UAAW,SACX,MAAO,YACP,IAAK,MACL,SAAU,CAAEA,CAAO,EACnB,UAAW,EACZ,CACF,CAEL,EAEQE,EAAO,CACX,UAAW,OACX,MAAO,wBACP,UAAW,CACf,EAEQC,EAAO,CACX,UAAW,QACX,MAAO,iFACP,UAAW,CACf,EAEQC,EAAQ,CACZ,UAAW,QACX,cAAe,0BACf,IAAK,aACL,WAAY,GACZ,SAAU,CACRP,EAAK,oBACLA,EAAK,qBACL,CACE,cAAe,eACf,UAAW,EACZ,EACD,CACE,MAAO,KACP,IAAK,KACL,aAAc,GACd,WAAY,GACZ,UAAW,EACX,SAAU,CACRK,EACAL,EAAK,oBACLA,EAAK,oBACN,CACF,EACD,CACE,UAAW,SACX,MAAO,KACP,IAAK,KACL,aAAc,GACd,WAAY,GACZ,UAAW,EACX,SAAU,CACRK,EACAL,EAAK,oBACLA,EAAK,oBACN,CACF,EACDM,CACD,CACL,EAEQE,EAAS,CACb,UAAW,WACX,cAAe,MACf,IAAKP,EAAM,UAAU,aAAa,EAClC,SAAU,CAAEK,CAAM,CACtB,EAEQG,EAAY,CAChB,MAAO,CACL,OACA,YACA,aACD,EACD,WAAY,CAAE,EAAG,SAAY,CACjC,EAEQC,EAAM,CACV,MAAO,CACL,OACA,MACA,MACA,gBACD,EACD,WAAY,CACV,EAAG,UACH,EAAG,SACJ,CACL,EAIQC,EAAe,CACnB,CAAE,MAAO,YAAc,EACvB,CACE,MAAO,iBACP,SAAU,QACX,CACL,EAEQC,EAAqB,CACzB,MAAO,CACL,QACA,QACA,WACD,EACD,WAAY,CAAE,EAAG,SAAY,CACjC,EA8BE,MAAO,CACL,KAAM,QACN,SAAU,CACR,QAAS,kBACT,QAAS,6RACV,EACD,SAAU,CAzBY,CACtB,MAAO,CACL,MACA,MACA,QACA,MACA,KACD,EACD,WAAY,CACV,EAAG,UACH,EAAG,UACH,EAAG,MACJ,EACD,IAAK,IACL,SAAU,CArBY,CACtB,UAAW,SACX,MAAO,KACX,CAoBK,CACL,EAUMZ,EAAK,oBACLA,EAAK,qBACLI,EACAC,EACAG,EACAD,EACAP,EAAK,cACLS,EACAC,EACA,GAAGC,EACHC,EACAV,CACD,CACL,CACA,CAEA,IAAAW,EAAiBd","x_google_ignoreList":[0]} |