1
|
{"version":3,"sources":["webpack:///./node_modules/highlight.js/lib/languages/erlang.js"],"names":["module","exports","hljs","BASIC_ATOM_RE","FUNCTION_NAME_RE","ERLANG_RESERVED","keyword","literal","COMMENT","NUMBER","className","begin","relevance","NAMED_FUN","FUNCTION_CALL","end","returnBegin","contains","endsWithParent","returnEnd","TUPLE","VAR1","VAR2","RECORD_ACCESS","UNDERSCORE_IDENT_RE","BLOCK_STATEMENTS","beginKeywords","keywords","inherit","APOS_STRING_MODE","QUOTE_STRING_MODE","BASIC_MODES","PARAMS","aliases","illegal","TITLE_MODE","starts","excludeEnd","lexemes","IDENT_RE"],"mappings":"oFAAAA,EAAOC,QAAU,SAASC,GACxB,IAAIC,EAAgB,uBAChBC,EAAmB,IAAMD,EAAgB,IAAMA,EAAgB,IAAMA,EAAgB,IACrFE,EAAkB,CACpBC,QACE,2IAEFC,QACE,cAGAC,EAAUN,EAAKM,QAAQ,IAAK,KAC5BC,EAAS,CACXC,UAAW,SACXC,MAAO,wDACPC,UAAW,GAETC,EAAY,CACdF,MAAO,UAAYR,EAAgB,SAEjCW,EAAgB,CAClBH,MAAOP,EAAmB,MAAOW,IAAK,MACtCC,aAAa,EACbJ,UAAW,EACXK,SAAU,CACR,CACEN,MAAOP,EAAkBQ,UAAW,GAEtC,CACED,MAAO,MAAOI,IAAK,MAAOG,gBAAgB,EAC1CC,WAAW,EACXP,UAAW,KAKbQ,EAAQ,CACVT,MAAO,IAAKI,IAAK,IACjBH,UAAW,GAGTS,EAAO,CACTV,MAAO,4BACPC,UAAW,GAETU,EAAO,CACTX,MAAO,qBACPC,UAAW,GAETW,EAAgB,CAClBZ,MAAO,IAAMT,EAAKsB,oBAClBZ,UAAW,EACXI,aAAa,EACbC,SAAU,CACR,CACEN,MAAO,IAAMT,EAAKsB,oBAClBZ,UAAW,GAEb,CACED,MAAO,IAAKI,IAAK,IACjBH,UAAW,KAMba,EAAmB,CACrBC,cAAe,0BAA2BX,IAAK,MAC/CY,SAAUtB,GAEZoB,EAAiBR,SAAW,CAC1BT,EACAK,EACAX,EAAK0B,QAAQ1B,EAAK2B,iBAAkB,CAACnB,UAAW,KAChDe,EACAX,EACAZ,EAAK4B,kBACLrB,EACAW,EACAC,EAAMC,EACNC,GAGF,IAAIQ,EAAc,CAChBvB,EACAK,EACAY,EACAX,EACAZ,EAAK4B,kBACLrB,EACAW,EACAC,EAAMC,EACNC,GAEFT,EAAcG,SAAS,GAAGA,SAAWc,EACrCX,EAAMH,SAAWc,EACjBR,EAAcN,SAAS,GAAGA,SAAWc,EAErC,IAAIC,EAAS,CACXtB,UAAW,SACXC,MAAO,MAAOI,IAAK,MACnBE,SAAUc,GAEZ,MAAO,CACLE,QAAS,CAAC,OACVN,SAAUtB,EACV6B,QAAS,4CACTjB,SAAU,CACR,CACEP,UAAW,WACXC,MAAO,IAAMR,EAAgB,UAAWY,IAAK,KAC7CC,aAAa,EACbkB,QAAS,yBACTjB,SAAU,CACRe,EACA9B,EAAK0B,QAAQ1B,EAAKiC,WAAY,CAACxB,MAAOR,KAExCiC,OAAQ,CACNrB,IAAK,QACLY,SAAUtB,EACVY,SAAUc,IAGdvB,EACA,CACEG,MAAO,KAAMI,IAAK,MAClBH,UAAW,EACXyB,YAAY,EACZrB,aAAa,EACbsB,QAAS,IAAMpC,EAAKqC,SACpBZ,SACE,0KAGFV,SAAU,CAACe,IAEbvB,EACAP,EAAK4B,kBACLP,EACAF,EAAMC,EACNF,EACA,CAACT,MAAO","file":"highlight/erlang.js?v=49f0a013201d070c4e41","sourcesContent":["module.exports = function(hljs) {\n var BASIC_ATOM_RE = '[a-z\\'][a-zA-Z0-9_\\']*';\n var FUNCTION_NAME_RE = '(' + BASIC_ATOM_RE + ':' + BASIC_ATOM_RE + '|' + BASIC_ATOM_RE + ')';\n var ERLANG_RESERVED = {\n keyword:\n 'after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if ' +\n 'let not of orelse|10 query receive rem try when xor',\n literal:\n 'false true'\n };\n\n var COMMENT = hljs.COMMENT('%', '$');\n var NUMBER = {\n className: 'number',\n begin: '\\\\b(\\\\d+#[a-fA-F0-9]+|\\\\d+(\\\\.\\\\d+)?([eE][-+]?\\\\d+)?)',\n relevance: 0\n };\n var NAMED_FUN = {\n begin: 'fun\\\\s+' + BASIC_ATOM_RE + '/\\\\d+'\n };\n var FUNCTION_CALL = {\n begin: FUNCTION_NAME_RE + '\\\\(', end: '\\\\)',\n returnBegin: true,\n relevance: 0,\n contains: [\n {\n begin: FUNCTION_NAME_RE, relevance: 0\n },\n {\n begin: '\\\\(', end: '\\\\)', endsWithParent: true,\n returnEnd: true,\n relevance: 0\n // \"contains\" defined later\n }\n ]\n };\n var TUPLE = {\n begin: '{', end: '}',\n relevance: 0\n // \"contains\" defined later\n };\n var VAR1 = {\n begin: '\\\\b_([A-Z][A-Za-z0-9_]*)?',\n relevance: 0\n };\n var VAR2 = {\n begin: '[A-Z][a-zA-Z0-9_]*',\n relevance: 0\n };\n var RECORD_ACCESS = {\n begin: '#' + hljs.UNDERSCORE_IDENT_RE,\n relevance: 0,\n returnBegin: true,\n contains: [\n {\n begin: '#' + hljs.UNDERSCORE_IDENT_RE,\n relevance: 0\n },\n {\n begin: '{', end: '}',\n relevance: 0\n // \"contains\" defined later\n }\n ]\n };\n\n var BLOCK_STATEMENTS = {\n beginKeywords: 'fun receive if try case', end: 'end',\n keywords: ERLANG_RESERVED\n };\n BLOCK_STATEMENTS.contains = [\n COMMENT,\n NAMED_FUN,\n hljs.inherit(hljs.APOS_STRING_MODE, {className: ''}),\n BLOCK_STATEMENTS,\n FUNCTION_CALL,\n hljs.QUOTE_STRING_MODE,\n NUMBER,\n TUPLE,\n VAR1, VAR2,\n RECORD_ACCESS\n ];\n\n var BASIC_MODES = [\n COMMENT,\n NAMED_FUN,\n BLOCK_STATEMENTS,\n FUNCTION_CALL,\n hljs.QUOTE_STRING_MODE,\n NUMBER,\n TUPLE,\n VAR1, VAR2,\n RECORD_ACCESS\n ];\n FUNCTION_CALL.contains[1].contains = BASIC_MODES;\n TUPLE.contains = BASIC_MODES;\n RECORD_ACCESS.contains[1].contains = BASIC_MODES;\n\n var PARAMS = {\n className: 'params',\n begin: '\\\\(', end: '\\\\)',\n contains: BASIC_MODES\n };\n return {\n aliases: ['erl'],\n keywords: ERLANG_RESERVED,\n illegal: '(</|\\\\*=|\\\\+=|-=|/\\\\*|\\\\*/|\\\\(\\\\*|\\\\*\\\\))',\n contains: [\n {\n className: 'function',\n begin: '^' + BASIC_ATOM_RE + '\\\\s*\\\\(', end: '->',\n returnBegin: true,\n illegal: '\\\\(|#|//|/\\\\*|\\\\\\\\|:|;',\n contains: [\n PARAMS,\n hljs.inherit(hljs.TITLE_MODE, {begin: BASIC_ATOM_RE})\n ],\n starts: {\n end: ';|\\\\.',\n keywords: ERLANG_RESERVED,\n contains: BASIC_MODES\n }\n },\n COMMENT,\n {\n begin: '^-', end: '\\\\.',\n relevance: 0,\n excludeEnd: true,\n returnBegin: true,\n lexemes: '-' + hljs.IDENT_RE,\n keywords:\n '-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn ' +\n '-import -include -include_lib -compile -define -else -endif -file -behaviour ' +\n '-behavior -spec',\n contains: [PARAMS]\n },\n NUMBER,\n hljs.QUOTE_STRING_MODE,\n RECORD_ACCESS,\n VAR1, VAR2,\n TUPLE,\n {begin: /\\.$/} // relevance booster\n ]\n };\n};"],"sourceRoot":""}
|