text/js/scala-DM40I5I8.chunk.mjs.map

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