text/js/highlight/groovy.js.map

1 строка
6.0 KiB
Plaintext

{"version":3,"sources":["webpack:///./node_modules/highlight.js/lib/languages/groovy.js"],"names":["source","re","lookahead","args","joined","map","x","join","concat","variants","obj","module","exports","hljs","COMMENT","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","relevance","contains","begin","className","REGEXP","BACKSLASH_ESCAPE","NUMBER","BINARY_NUMBER_MODE","C_NUMBER_MODE","STRING","end","APOS_STRING_MODE","QUOTE_STRING_MODE","name","keywords","built_in","literal","keyword","SHEBANG","binary","beginKeywords","illegal","UNDERSCORE_TITLE_MODE","IDENT_RE","excludeBegin"],"mappings":"mGASA,SAASA,EAAOC,GACd,OAAKA,EACa,iBAAPA,EAAwBA,EAE5BA,EAAGD,OAHM,KAUlB,SAASE,EAAUD,GACjB,OAOF,WAAyB,2BAANE,EAAM,yBAANA,EAAM,gBACvB,IAAMC,EAASD,EAAKE,KAAI,SAACC,GAAD,OAAON,EAAOM,MAAIC,KAAK,IAC/C,OAAOH,EATAI,CAAO,MAAOP,EAAI,KAmB3B,SAASQ,EAASA,GAAoB,IAAVC,EAAU,uDAAJ,GAEhC,OADAA,EAAID,SAAWA,EACRC,EA0HTC,EAAOC,QAvHP,SAAgBC,GACd,IACMC,EAAUL,EAAS,CACvBI,EAAKE,oBACLF,EAAKG,qBACLH,EAAKC,QACH,UACA,OACA,CACEG,UAAY,EACZC,SAAW,CACT,CAEEC,MAAO,OAAQF,UAAW,GACzB,CACDG,UAAY,SACZD,MAAQ,mBAMZE,EAAS,CACbD,UAAW,SACXD,MAAO,iBACPD,SAAU,CACRL,EAAKS,mBAGHC,EAASd,EAAS,CACtBI,EAAKW,mBACLX,EAAKY,gBAEDC,EAASjB,EAAS,CACtB,CACEU,MAAO,MACPQ,IAAK,OACJ,CACDR,MAAO,MACPQ,IAAK,OACJ,CACDR,MAAO,OACPQ,IAAK,OACLV,UAAW,IAEbJ,EAAKe,iBACLf,EAAKgB,mBAEL,CAAET,UAAW,WAGb,MAAO,CACHU,KAAM,SACNC,SAAU,CACNC,SAAU,aACVC,QAAS,kBACTC,QACA,6TAQJhB,SAAU,CACNL,EAAKsB,QAAQ,CACXC,OAAQ,SACRnB,UAAW,KAEbH,EACAY,EACAL,EACAE,EACA,CACIH,UAAW,QACXiB,cAAe,6BAA8BV,IAAK,KAClDW,QAAS,IACTpB,SAAU,CACN,CAACmB,cAAe,sBAChBxB,EAAK0B,wBAGb,CACInB,UAAW,OACXD,MAAO,aACPF,UAAW,GAEf,CAEEG,UAAW,OAAQD,MAAOqB,yBAE5B,CAGErB,MAAO,KACPQ,IAAK,IACLV,UAAW,EACXC,SAAU,CACRJ,EACAY,EACAL,EACAE,EACA,SAGJ,CAEIH,UAAW,SACXD,MAAO,UAAYjB,EAAUsC,mBAC7BC,cAAc,EACdd,IAAKa,kBACLvB,UAAW,IAGnBqB,QAAS","file":"highlight/groovy.js?v=5e41245ea04802eff47d","sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n return concat('(?=', re, ')');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/*\n Language: Groovy\n Author: Guillaume Laforge <glaforge@gmail.com>\n Description: Groovy programming language implementation inspired from Vsevolod's Java mode\n Website: https://groovy-lang.org\n */\n\nfunction variants(variants, obj = {}) {\n obj.variants = variants;\n return obj;\n}\n\nfunction groovy(hljs) {\n const IDENT_RE = '[A-Za-z0-9_$]+';\n const COMMENT = variants([\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.COMMENT(\n '/\\\\*\\\\*',\n '\\\\*/',\n {\n relevance : 0,\n contains : [\n {\n // eat up @'s in emails to prevent them to be recognized as doctags\n begin: /\\w+@/, relevance: 0\n }, {\n className : 'doctag',\n begin : '@[A-Za-z]+'\n }\n ]\n }\n )\n ]);\n const REGEXP = {\n className: 'regexp',\n begin: /~?\\/[^\\/\\n]+\\//,\n contains: [\n hljs.BACKSLASH_ESCAPE\n ]\n };\n const NUMBER = variants([\n hljs.BINARY_NUMBER_MODE,\n hljs.C_NUMBER_MODE,\n ]);\n const STRING = variants([\n {\n begin: /\"\"\"/,\n end: /\"\"\"/\n }, {\n begin: /'''/,\n end: /'''/\n }, {\n begin: \"\\\\$/\",\n end: \"/\\\\$\",\n relevance: 10\n },\n hljs.APOS_STRING_MODE,\n hljs.QUOTE_STRING_MODE,\n ],\n { className: \"string\" }\n );\n\n return {\n name: 'Groovy',\n keywords: {\n built_in: 'this super',\n literal: 'true false null',\n keyword:\n 'byte short char int long boolean float double void ' +\n // groovy specific keywords\n 'def as in assert trait ' +\n // common keywords with Java\n 'abstract static volatile transient public private protected synchronized final ' +\n 'class interface enum if else for while switch case break default continue ' +\n 'throw throws try catch finally implements extends new import package return instanceof'\n },\n contains: [\n hljs.SHEBANG({\n binary: \"groovy\",\n relevance: 10\n }),\n COMMENT,\n STRING,\n REGEXP,\n NUMBER,\n {\n className: 'class',\n beginKeywords: 'class interface trait enum', end: /\\{/,\n illegal: ':',\n contains: [\n {beginKeywords: 'extends implements'},\n hljs.UNDERSCORE_TITLE_MODE\n ]\n },\n {\n className: 'meta',\n begin: '@[A-Za-z]+',\n relevance: 0\n },\n {\n // highlight map keys and named parameters as attrs\n className: 'attr', begin: IDENT_RE + '[ \\t]*:'\n },\n {\n // catch middle element of the ternary operator\n // to avoid highlight it as a label, named parameter, or map key\n begin: /\\?/,\n end: /:/,\n relevance: 0,\n contains: [\n COMMENT,\n STRING,\n REGEXP,\n NUMBER,\n 'self'\n ]\n },\n {\n // highlight labeled statements\n className: 'symbol',\n begin: '^[ \\t]*' + lookahead(IDENT_RE + ':'),\n excludeBegin: true,\n end: IDENT_RE + ':',\n relevance: 0\n }\n ],\n illegal: /#|<\\//\n };\n}\n\nmodule.exports = groovy;\n"],"sourceRoot":""}