1
|
{"version":3,"sources":["webpack:///./node_modules/highlight.js/lib/languages/livescript.js"],"names":["KEYWORDS","LITERALS","BUILT_INS","concat","module","exports","hljs","KEYWORDS$1","keyword","join","literal","built_in","JS_IDENT_RE","TITLE","inherit","TITLE_MODE","begin","SUBST","className","end","keywords","SUBST_SIMPLE","EXPRESSIONS","BINARY_NUMBER_MODE","relevance","starts","variants","contains","BACKSLASH_ESCAPE","excludeEnd","HASH_COMMENT_MODE","excludeBegin","subLanguage","PARAMS","returnBegin","name","aliases","illegal","COMMENT","beginKeywords","endsWithParent","returnEnd"],"mappings":"oGAAA,IAAMA,EAAW,CACf,KACA,KACA,KACA,KACA,MACA,QACA,UACA,MACA,MACA,WACA,KACA,SACA,OACA,OACA,QACA,QACA,aACA,OACA,QACA,OACA,UACA,MACA,SACA,WACA,SACA,SACA,MACA,QACA,QACA,QAIA,WACA,QACA,QACA,SACA,SACA,OACA,SACA,WAEIC,EAAW,CACf,OACA,QACA,OACA,YACA,MACA,YAiFIC,EAAY,GAAGC,OAlCI,CACvB,cACA,aACA,gBACA,eAEA,UACA,UAEA,OACA,WACA,QACA,aACA,WACA,YACA,qBACA,YACA,qBACA,SACA,YAGyB,CACzB,YACA,OACA,QACA,UACA,SACA,WACA,eACA,SACA,UA3EY,CACZ,OACA,WACA,SACA,OACA,OACA,SACA,SACA,SACA,WACA,UACA,QACA,SACA,MACA,MACA,UACA,UACA,QACA,UACA,OACA,UACA,eACA,aACA,aACA,YACA,cACA,cACA,eACA,QACA,aACA,oBACA,eAGkB,CAClB,YACA,gBACA,aACA,iBACA,cACA,YACA,aAqRFC,EAAOC,QA/NP,SAAoBC,GAClB,IA4CMC,EAAa,CACjBC,QAASR,EAASG,OAhCQ,CAC1B,OACA,SACA,QACA,OACA,KACA,KACA,OACA,MACA,KACA,KACA,OACA,MACA,KACA,OACA,YACA,OACA,KACA,MACA,cACA,OACA,OACA,SACA,OACA,MACA,YACA,YACA,UACA,SACA,cAG8CM,KAAK,KACnDC,QA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ACTV,SAAUL,EAAYnB,OAAO,CAC3BG,EAAKgC,QAAQ,SAAU,UACvBhC,EAAKwB,kBAXO,CACdd,MAAO,2BAYL,CACEE,UAAW,WACXS,SAAU,CACRd,EACAoB,GAEFC,aAAa,EACbR,SAAU,CACR,CACEV,MAAO,IAAMJ,EAAc,6CAC3BO,IAAK,UAEP,CACEH,MAAO,IAAMJ,EAAc,uDAC3BO,IAAK,kBAEP,CACEH,MAAO,IAAMJ,EAAc,uDAC3BO,IAAK,sBAIX,CACED,UAAW,QACXqB,cAAe,QACfpB,IAAK,IACLkB,QAAS,YACTV,SAAU,CACR,CACEY,cAAe,UACfC,gBAAgB,EAChBH,QAAS,YACTV,SAAU,CAACd,IAEbA,IAGJ,CACEG,MAAOJ,EAAc,IACrBO,IAAK,IACLe,aAAa,EACbO,WAAW,EACXjB,UAAW","file":"highlight/livescript.js?v=772eccca51cf689ab169","sourcesContent":["const KEYWORDS = [\n \"as\", // for exports\n \"in\",\n \"of\",\n \"if\",\n \"for\",\n \"while\",\n \"finally\",\n \"var\",\n \"new\",\n \"function\",\n \"do\",\n \"return\",\n \"void\",\n \"else\",\n \"break\",\n \"catch\",\n \"instanceof\",\n \"with\",\n \"throw\",\n \"case\",\n \"default\",\n \"try\",\n \"switch\",\n \"continue\",\n \"typeof\",\n \"delete\",\n \"let\",\n \"yield\",\n \"const\",\n \"class\",\n // JS handles these with a special rule\n // \"get\",\n // \"set\",\n \"debugger\",\n \"async\",\n \"await\",\n \"static\",\n \"import\",\n \"from\",\n \"export\",\n \"extends\"\n];\nconst LITERALS = [\n \"true\",\n \"false\",\n \"null\",\n \"undefined\",\n \"NaN\",\n \"Infinity\"\n];\n\nconst TYPES = [\n \"Intl\",\n \"DataView\",\n \"Number\",\n \"Math\",\n \"Date\",\n \"String\",\n \"RegExp\",\n \"Object\",\n \"Function\",\n \"Boolean\",\n \"Error\",\n \"Symbol\",\n \"Set\",\n \"Map\",\n \"WeakSet\",\n \"WeakMap\",\n \"Proxy\",\n \"Reflect\",\n \"JSON\",\n \"Promise\",\n \"Float64Array\",\n \"Int16Array\",\n \"Int32Array\",\n \"Int8Array\",\n \"Uint16Array\",\n \"Uint32Array\",\n \"Float32Array\",\n \"Array\",\n \"Uint8Array\",\n \"Uint8ClampedArray\",\n \"ArrayBuffer\"\n];\n\nconst ERROR_TYPES = [\n \"EvalError\",\n \"InternalError\",\n \"RangeError\",\n \"ReferenceError\",\n \"SyntaxError\",\n \"TypeError\",\n \"URIError\"\n];\n\nconst BUILT_IN_GLOBALS = [\n \"setInterval\",\n \"setTimeout\",\n \"clearInterval\",\n \"clearTimeout\",\n\n \"require\",\n \"exports\",\n\n \"eval\",\n \"isFinite\",\n \"isNaN\",\n \"parseFloat\",\n \"parseInt\",\n \"decodeURI\",\n \"decodeURIComponent\",\n \"encodeURI\",\n \"encodeURIComponent\",\n \"escape\",\n \"unescape\"\n];\n\nconst BUILT_IN_VARIABLES = [\n \"arguments\",\n \"this\",\n \"super\",\n \"console\",\n \"window\",\n \"document\",\n \"localStorage\",\n \"module\",\n \"global\" // Node.js\n];\n\nconst BUILT_INS = [].concat(\n BUILT_IN_GLOBALS,\n BUILT_IN_VARIABLES,\n TYPES,\n ERROR_TYPES\n);\n\n/*\nLanguage: LiveScript\nAuthor: Taneli Vatanen <taneli.vatanen@gmail.com>\nContributors: Jen Evers-Corvina <jen@sevvie.net>\nOrigin: coffeescript.js\nDescription: LiveScript is a programming language that transcompiles to JavaScript. For info about language see http://livescript.net/\nWebsite: https://livescript.net\nCategory: scripting\n*/\n\nfunction livescript(hljs) {\n const LIVESCRIPT_BUILT_INS = [\n 'npm',\n 'print'\n ];\n const LIVESCRIPT_LITERALS = [\n 'yes',\n 'no',\n 'on',\n 'off',\n 'it',\n 'that',\n 'void'\n ];\n const LIVESCRIPT_KEYWORDS = [\n 'then',\n 'unless',\n 'until',\n 'loop',\n 'of',\n 'by',\n 'when',\n 'and',\n 'or',\n 'is',\n 'isnt',\n 'not',\n 'it',\n 'that',\n 'otherwise',\n 'from',\n 'to',\n 'til',\n 'fallthrough',\n 'case',\n 'enum',\n 'native',\n 'list',\n 'map',\n '__hasProp',\n '__extends',\n '__slice',\n '__bind',\n '__indexOf'\n ];\n const KEYWORDS$1 = {\n keyword: KEYWORDS.concat(LIVESCRIPT_KEYWORDS).join(\" \"),\n literal: LITERALS.concat(LIVESCRIPT_LITERALS).join(\" \"),\n built_in: BUILT_INS.concat(LIVESCRIPT_BUILT_INS).join(\" \")\n };\n const JS_IDENT_RE = '[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*';\n const TITLE = hljs.inherit(hljs.TITLE_MODE, {\n begin: JS_IDENT_RE\n });\n const SUBST = {\n className: 'subst',\n begin: /#\\{/,\n end: /\\}/,\n keywords: KEYWORDS$1\n };\n const SUBST_SIMPLE = {\n className: 'subst',\n begin: /#[A-Za-z$_]/,\n end: /(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,\n keywords: KEYWORDS$1\n };\n const EXPRESSIONS = [\n hljs.BINARY_NUMBER_MODE,\n {\n className: 'number',\n begin: '(\\\\b0[xX][a-fA-F0-9_]+)|(\\\\b\\\\d(\\\\d|_\\\\d)*(\\\\.(\\\\d(\\\\d|_\\\\d)*)?)?(_*[eE]([-+]\\\\d(_\\\\d|\\\\d)*)?)?[_a-z]*)',\n relevance: 0,\n starts: {\n end: '(\\\\s*/)?',\n relevance: 0\n } // a number tries to eat the following slash to prevent treating it as a regexp\n },\n {\n className: 'string',\n variants: [\n {\n begin: /'''/,\n end: /'''/,\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: /'/,\n end: /'/,\n contains: [hljs.BACKSLASH_ESCAPE]\n },\n {\n begin: /\"\"\"/,\n end: /\"\"\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST,\n SUBST_SIMPLE\n ]\n },\n {\n begin: /\"/,\n end: /\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n SUBST,\n SUBST_SIMPLE\n ]\n },\n {\n begin: /\\\\/,\n end: /(\\s|$)/,\n excludeEnd: true\n }\n ]\n },\n {\n className: 'regexp',\n variants: [\n {\n begin: '//',\n end: '//[gim]*',\n contains: [\n SUBST,\n hljs.HASH_COMMENT_MODE\n ]\n },\n {\n // regex can't start with space to parse x / 2 / 3 as two divisions\n // regex can't start with *, and it supports an \"illegal\" in the main mode\n begin: /\\/(?![ *])(\\\\.|[^\\\\\\n])*?\\/[gim]*(?=\\W)/\n }\n ]\n },\n {\n begin: '@' + JS_IDENT_RE\n },\n {\n begin: '``',\n end: '``',\n excludeBegin: true,\n excludeEnd: true,\n subLanguage: 'javascript'\n }\n ];\n SUBST.contains = EXPRESSIONS;\n\n const PARAMS = {\n className: 'params',\n begin: '\\\\(',\n returnBegin: true,\n /* We need another contained nameless mode to not have every nested\n pair of parens to be called \"params\" */\n contains: [\n {\n begin: /\\(/,\n end: /\\)/,\n keywords: KEYWORDS$1,\n contains: ['self'].concat(EXPRESSIONS)\n }\n ]\n };\n\n const SYMBOLS = {\n begin: '(#=>|=>|\\\\|>>|-?->|!->)'\n };\n\n return {\n name: 'LiveScript',\n aliases: ['ls'],\n keywords: KEYWORDS$1,\n illegal: /\\/\\*/,\n contains: EXPRESSIONS.concat([\n hljs.COMMENT('\\\\/\\\\*', '\\\\*\\\\/'),\n hljs.HASH_COMMENT_MODE,\n SYMBOLS, // relevance booster\n {\n className: 'function',\n contains: [\n TITLE,\n PARAMS\n ],\n returnBegin: true,\n variants: [\n {\n begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?(\\\\(.*\\\\)\\\\s*)?\\\\B->\\\\*?',\n end: '->\\\\*?'\n },\n {\n begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?!?(\\\\(.*\\\\)\\\\s*)?\\\\B[-~]{1,2}>\\\\*?',\n end: '[-~]{1,2}>\\\\*?'\n },\n {\n begin: '(' + JS_IDENT_RE + '\\\\s*(?:=|:=)\\\\s*)?(\\\\(.*\\\\)\\\\s*)?\\\\B!?[-~]{1,2}>\\\\*?',\n end: '!?[-~]{1,2}>\\\\*?'\n }\n ]\n },\n {\n className: 'class',\n beginKeywords: 'class',\n end: '$',\n illegal: /[:=\"\\[\\]]/,\n contains: [\n {\n beginKeywords: 'extends',\n endsWithParent: true,\n illegal: /[:=\"\\[\\]]/,\n contains: [TITLE]\n },\n TITLE\n ]\n },\n {\n begin: JS_IDENT_RE + ':',\n end: ':',\n returnBegin: true,\n returnEnd: true,\n relevance: 0\n }\n ])\n };\n}\n\nmodule.exports = livescript;\n"],"sourceRoot":""}
|