text/js/highlight/gams.js.map

1 строка
7.8 KiB
Plaintext

{"version":3,"sources":["webpack:///./node_modules/highlight.js/lib/languages/gams.js"],"names":["source","re","concat","args","joined","map","x","join","module","exports","hljs","KEYWORDS","keyword","literal","built_in","SYMBOLS","className","variants","begin","QSTR","end","illegal","contains","BACKSLASH_ESCAPE","ASSIGNMENT","keywords","C_LINE_COMMENT_MODE","C_BLOCK_COMMENT_MODE","QUOTE_STRING_MODE","APOS_STRING_MODE","C_NUMBER_MODE","COMMENT_WORD","DESCTEXT","excludeBegin","endsWithParent","relevance","name","aliases","case_insensitive","COMMENT","returnBegin","beginKeywords","excludeEnd"],"mappings":"mGASA,SAASA,EAAOC,GACd,OAAKA,EACa,iBAAPA,EAAwBA,EAE5BA,EAAGD,OAHM,KAkBlB,SAASE,IAAgB,2BAANC,EAAM,yBAANA,EAAM,gBACvB,IAAMC,EAASD,EAAKE,KAAI,SAACC,GAAD,OAAON,EAAOM,MAAIC,KAAK,IAC/C,OAAOH,EAiLTI,EAAOC,QA7KP,SAAcC,GACZ,IAfwBT,EAelBU,EAAW,CACfC,QACE,oVAKFC,QACE,aACFC,SACE,u3BAsBEC,EAAU,CACdC,UAAW,SACXC,SAAU,CACR,CACEC,MAAO,cAET,CACEA,MAAO,QAIPC,EAAO,CACXH,UAAW,UACXC,SAAU,CACR,CACEC,MAAO,IACPE,IAAK,KAEP,CACEF,MAAO,IACPE,IAAK,MAGTC,QAAS,MACTC,SAAU,CAACZ,EAAKa,mBAEZC,EAAa,CACjBN,MAAO,IACPE,IAAK,IACLK,SAAUd,EACVW,SAAU,CACRH,EACAT,EAAKgB,oBACLhB,EAAKiB,qBACLjB,EAAKkB,kBACLlB,EAAKmB,iBACLnB,EAAKoB,gBAGHC,EAAe,uCACfC,EAAW,CACfd,MAAO,2CACPe,cAAc,EACdb,IAAK,IACLc,gBAAgB,EAChBZ,SAAU,CACRH,EACAK,EACA,CACER,UAAW,UAEXE,MAAOhB,EACL6B,GAnGgB9B,EAqGCC,EAAO,OAAQ6B,GApGjC7B,EAAO,IAAKD,EAAI,QAsGjBkC,UAAW,KAKjB,MAAO,CACLC,KAAM,OACNC,QAAS,CAAC,OACVC,kBAAkB,EAClBb,SAAUd,EACVW,SAAU,CACRZ,EAAK6B,QAAQ,YAAa,cAC1B,CACEvB,UAAW,OACXE,MAAO,gBACPE,IAAK,IACLoB,aAAa,EACblB,SAAU,CACR,CACEN,UAAW,eACXE,MAAO,mBAIbR,EAAK6B,QAAQ,OAAQ,KACrB7B,EAAKgB,oBACLhB,EAAKiB,qBACLjB,EAAKkB,kBACLlB,EAAKmB,iBAEL,CACEY,cACE,qFAEFrB,IAAK,IACLE,SAAU,CACRZ,EAAK6B,QAAQ,OAAQ,KACrB7B,EAAKgB,oBACLhB,EAAKiB,qBACLjB,EAAKkB,kBACLlB,EAAKmB,iBACLL,EACAQ,IAGJ,CACES,cAAe,QACfrB,IAAK,IACLoB,aAAa,EACblB,SAAU,CACR,CACEmB,cAAe,QACfrB,IAAK,IACLE,SAAU,CAACU,IAEbtB,EAAK6B,QAAQ,OAAQ,KACrB7B,EAAKgB,oBACLhB,EAAKiB,qBACLjB,EAAKkB,kBACLlB,EAAKmB,iBACLnB,EAAKoB,gBAKT,CACEd,UAAW,WACXE,MAAO,iCACPsB,aAAa,EACblB,SAAU,CACR,CACEN,UAAW,QACXE,MAAO,eAvIF,CACbF,UAAW,SACXE,MAAO,KACPE,IAAK,KACLa,cAAc,EACdS,YAAY,GAqIN3B,IAGJL,EAAKoB,cACLf","file":"highlight/gams.js?v=70291fdabad051460750","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 anyNumberOfTimes(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/** @type LanguageFn */\nfunction gams(hljs) {\n const KEYWORDS = {\n keyword:\n 'abort acronym acronyms alias all and assign binary card diag display ' +\n 'else eq file files for free ge gt if integer le loop lt maximizing ' +\n 'minimizing model models ne negative no not option options or ord ' +\n 'positive prod put putpage puttl repeat sameas semicont semiint smax ' +\n 'smin solve sos1 sos2 sum system table then until using while xor yes',\n literal:\n 'eps inf na',\n built_in:\n 'abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy ' +\n 'cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact ' +\n 'floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max ' +\n 'min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power ' +\n 'randBinomial randLinear randTriangle round rPower sigmoid sign ' +\n 'signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt ' +\n 'tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp ' +\n 'bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt ' +\n 'rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear ' +\n 'jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion ' +\n 'handleCollect handleDelete handleStatus handleSubmit heapFree ' +\n 'heapLimit heapSize jobHandle jobKill jobStatus jobTerminate ' +\n 'licenseLevel licenseStatus maxExecError sleep timeClose timeComp ' +\n 'timeElapsed timeExec timeStart'\n };\n const PARAMS = {\n className: 'params',\n begin: /\\(/,\n end: /\\)/,\n excludeBegin: true,\n excludeEnd: true\n };\n const SYMBOLS = {\n className: 'symbol',\n variants: [\n {\n begin: /=[lgenxc]=/\n },\n {\n begin: /\\$/\n }\n ]\n };\n const QSTR = { // One-line quoted comment string\n className: 'comment',\n variants: [\n {\n begin: '\\'',\n end: '\\''\n },\n {\n begin: '\"',\n end: '\"'\n }\n ],\n illegal: '\\\\n',\n contains: [hljs.BACKSLASH_ESCAPE]\n };\n const ASSIGNMENT = {\n begin: '/',\n end: '/',\n keywords: KEYWORDS,\n contains: [\n QSTR,\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n hljs.C_NUMBER_MODE\n ]\n };\n const COMMENT_WORD = /[a-z0-9&#*=?@\\\\><:,()$[\\]_.{}!+%^-]+/;\n const DESCTEXT = { // Parameter/set/variable description text\n begin: /[a-z][a-z0-9_]*(\\([a-z0-9_, ]*\\))?[ \\t]+/,\n excludeBegin: true,\n end: '$',\n endsWithParent: true,\n contains: [\n QSTR,\n ASSIGNMENT,\n {\n className: 'comment',\n // one comment word, then possibly more\n begin: concat(\n COMMENT_WORD,\n // [ ] because \\s would be too broad (matching newlines)\n anyNumberOfTimes(concat(/[ ]+/, COMMENT_WORD))\n ),\n relevance: 0\n }\n ]\n };\n\n return {\n name: 'GAMS',\n aliases: ['gms'],\n case_insensitive: true,\n keywords: KEYWORDS,\n contains: [\n hljs.COMMENT(/^\\$ontext/, /^\\$offtext/),\n {\n className: 'meta',\n begin: '^\\\\$[a-z0-9]+',\n end: '$',\n returnBegin: true,\n contains: [\n {\n className: 'meta-keyword',\n begin: '^\\\\$[a-z0-9]+'\n }\n ]\n },\n hljs.COMMENT('^\\\\*', '$'),\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n // Declarations\n {\n beginKeywords:\n 'set sets parameter parameters variable variables ' +\n 'scalar scalars equation equations',\n end: ';',\n contains: [\n hljs.COMMENT('^\\\\*', '$'),\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n ASSIGNMENT,\n DESCTEXT\n ]\n },\n { // table environment\n beginKeywords: 'table',\n end: ';',\n returnBegin: true,\n contains: [\n { // table header row\n beginKeywords: 'table',\n end: '$',\n contains: [DESCTEXT]\n },\n hljs.COMMENT('^\\\\*', '$'),\n hljs.C_LINE_COMMENT_MODE,\n hljs.C_BLOCK_COMMENT_MODE,\n hljs.QUOTE_STRING_MODE,\n hljs.APOS_STRING_MODE,\n hljs.C_NUMBER_MODE\n // Table does not contain DESCTEXT or ASSIGNMENT\n ]\n },\n // Function definitions\n {\n className: 'function',\n begin: /^[a-z][a-z0-9_,\\-+' ()$]+\\.{2}/,\n returnBegin: true,\n contains: [\n { // Function title\n className: 'title',\n begin: /^[a-z0-9_]+/\n },\n PARAMS,\n SYMBOLS\n ]\n },\n hljs.C_NUMBER_MODE,\n SYMBOLS\n ]\n };\n}\n\nmodule.exports = gams;\n"],"sourceRoot":""}