1
|
{"version":3,"sources":["webpack:///./node_modules/highlight.js/lib/languages/routeros.js"],"names":["module","exports","hljs","STATEMENTS","LITERALS","VAR","className","variants","begin","QUOTE_STRING","end","contains","BACKSLASH_ESCAPE","APOS_STRING","aliases","case_insensitive","lexemes","keywords","literal","keyword","split","join","illegal","COMMENT","relevance","returnBegin","endsWithParent"],"mappings":"qFAAAA,EAAOC,QAMP,SAASC,GAEP,IAAIC,EAAa,mEAQbC,EAAW,qCAaXC,EAAM,CACRC,UAAW,WACXC,SAAU,CACR,CAACC,MAAO,sBACR,CAACA,MAAO,gBAIRC,EAAe,CACjBH,UAAW,SACXE,MAAO,IAAKE,IAAK,IACjBC,SAAU,CACRT,EAAKU,iBACLP,EACA,CACEC,UAAW,WACXE,MAAO,OAAQE,IAAK,KACpBC,SAAU,CAACT,EAAKU,qBAKlBC,EAAc,CAChBP,UAAW,SACXE,MAAO,IAAKE,IAAK,KAMnB,MAAO,CACLI,QAAS,CAAC,WAAY,YACtBC,kBAAkB,EAClBC,QAAS,WACTC,SAAU,CACRC,QAASd,EACTe,QAAShB,EAAa,KAAOA,EAAWiB,MAAM,KAAKC,KAAK,MAAQ,KAtD9C,mKAsDqED,MAAM,KAAKC,KAAK,OAEzGV,SAAU,CACR,CACEJ,SAAU,CACR,CAAEC,MAAO,KAAME,IAAK,KACpB,CAAEF,MAAO,OAAQE,IAAK,QACtB,CAAEF,MAAO,KAAME,IAAK,KACpB,CAAEF,MAAO,KAAME,IAAK,KACpB,CAAEF,MAAO,gBAAiBE,IAAK,KAC/B,CAAEF,MAAO,OAAQE,IAAK,KACtB,CAAEF,MAAO,QAASE,IAAK,SACvB,CAAEF,MAAO,MAAOE,IAAK,KACrB,CAAEF,MAAO,UAAWE,IAAK,MACzB,CAAEF,MAAO,kBAAmBE,IAAK,MAEnCY,QAAS,KAEXpB,EAAKqB,QAAQ,KAAM,KACnBd,EACAI,EACAR,EACA,CACEG,MAAO,+BACPgB,UAAW,EACXC,aAAa,EACbd,SAAU,CACR,CACEL,UAAW,YACXE,MAAO,SAET,CACEA,MAAO,IACPkB,gBAAiB,EACjBF,UAAW,EACXb,SAAU,CACRF,EACAI,EACAR,EACA,CACEC,UAAW,UACXE,MAAO,OAASJ,EAASgB,MAAM,KAAKC,KAAK,KAAO,QAgBlD,CAGEb,MAAO,gCAMjB,CAEEF,UAAW,SACXE,MAAO,kBAGT,CACEA,MAAO,OA5HS,wFA4HgBY,MAAM,KAAKC,KAAK,KAAO,eACvDI,aAAa,EACbd,SAAU,CACR,CACEL,UAAW,eACXE,MAAO,SAKb,CACEF,UAAW,WACXC,SAAU,CACR,CAACC,MAAO,oBArIF,o7BAqIgCY,MAAM,KAAKC,KAAK,KAAO,WAAWG,UAAW,IACnF,CAAChB,MAAO","file":"highlight/routeros.js?v=72cc5a0ea82f7ae89026","sourcesContent":["module.exports = // Colors from RouterOS terminal:\n// green - #0E9A00\n// teal - #0C9A9A\n// purple - #99069A\n// light-brown - #9A9900\n\nfunction(hljs) {\n\n var STATEMENTS = 'foreach do while for if from to step else on-error and or not in';\n\n // Global commands: Every global command should start with \":\" token, otherwise it will be treated as variable.\n var GLOBAL_COMMANDS = 'global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime';\n\n // Common commands: Following commands available from most sub-menus:\n var COMMON_COMMANDS = 'add remove enable disable set get print export edit find run debug error info warning';\n\n var LITERALS = 'true false yes no nothing nil null';\n\n var OBJECTS = 'traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw';\n\n // print parameters\n // Several parameters are available for print command:\n // ToDo: var PARAMETERS_PRINT = 'append as-value brief detail count-only file follow follow-only from interval terse value-list without-paging where info';\n // ToDo: var OPERATORS = '&& and ! not || or in ~ ^ & << >> + - * /';\n // ToDo: var TYPES = 'num number bool boolean str string ip ip6-prefix id time array';\n // ToDo: The following tokens serve as delimiters in the grammar: () [] {} : ; $ /\n\n var VAR_PREFIX = 'global local set for foreach';\n\n var VAR = {\n className: 'variable',\n variants: [\n {begin: /\\$[\\w\\d#@][\\w\\d_]*/},\n {begin: /\\$\\{(.*?)}/}\n ]\n };\n\n var QUOTE_STRING = {\n className: 'string',\n begin: /\"/, end: /\"/,\n contains: [\n hljs.BACKSLASH_ESCAPE,\n VAR,\n {\n className: 'variable',\n begin: /\\$\\(/, end: /\\)/,\n contains: [hljs.BACKSLASH_ESCAPE]\n }\n ]\n };\n\n var APOS_STRING = {\n className: 'string',\n begin: /'/, end: /'/\n };\n\n var IPADDR = '((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\b';\n var IPADDR_wBITMASK = IPADDR+'/(3[0-2]|[1-2][0-9]|\\\\d)';\n //////////////////////////////////////////////////////////////////////\n return {\n aliases: ['routeros', 'mikrotik'],\n case_insensitive: true,\n lexemes: /:?[\\w-]+/,\n keywords: {\n literal: LITERALS,\n keyword: STATEMENTS + ' :' + STATEMENTS.split(' ').join(' :') + ' :' + GLOBAL_COMMANDS.split(' ').join(' :'),\n },\n contains: [\n { // недопустимые конструкции\n variants: [\n { begin: /^@/, end: /$/, }, // dns\n { begin: /\\/\\*/, end: /\\*\\//, }, // -- comment\n { begin: /%%/, end: /$/, }, // -- comment\n { begin: /^'/, end: /$/, }, // Monkey one line comment\n { begin: /^\\s*\\/[\\w-]+=/, end: /$/, }, // jboss-cli\n { begin: /\\/\\//, end: /$/, }, // Stan comment\n { begin: /^\\[\\</, end: /\\>\\]$/, }, // F# class declaration?\n { begin: /<\\//, end: />/, }, // HTML tags\n { begin: /^facet /, end: /\\}/, }, // roboconf - лютый костыль )))\n { begin: '^1\\\\.\\\\.(\\\\d+)$', end: /$/, }, // tap\n ],\n illegal: /./,\n },\n hljs.COMMENT('^#', '$'),\n QUOTE_STRING,\n APOS_STRING,\n VAR,\n { // attribute=value\n begin: /[\\w-]+\\=([^\\s\\{\\}\\[\\]\\(\\)]+)/,\n relevance: 0,\n returnBegin: true,\n contains: [\n {\n className: 'attribute',\n begin: /[^=]+/\n },\n {\n begin: /=/,\n endsWithParent: true,\n relevance: 0,\n contains: [\n QUOTE_STRING,\n APOS_STRING,\n VAR,\n {\n className: 'literal',\n begin: '\\\\b(' + LITERALS.split(' ').join('|') + ')\\\\b',\n },\n /*{\n // IPv4 addresses and subnets\n className: 'number',\n variants: [\n {begin: IPADDR_wBITMASK+'(,'+IPADDR_wBITMASK+')*'}, //192.168.0.0/24,1.2.3.0/24\n {begin: IPADDR+'-'+IPADDR}, // 192.168.0.1-192.168.0.3\n {begin: IPADDR+'(,'+IPADDR+')*'}, // 192.168.0.1,192.168.0.34,192.168.24.1,192.168.0.1\n ]\n }, // */\n /*{\n // MAC addresses and DHCP Client IDs\n className: 'number',\n begin: /\\b(1:)?([0-9A-Fa-f]{1,2}[:-]){5}([0-9A-Fa-f]){1,2}\\b/,\n }, //*/\n {\n // Не форматировать не классифицированные значения. Необходимо для исключения подсветки значений как built_in.\n // className: 'number',\n begin: /(\"[^\"]*\"|[^\\s\\{\\}\\[\\]]+)/,\n }, //*/\n ]\n } //*/\n ]\n },//*/\n {\n // HEX values\n className: 'number',\n begin: /\\*[0-9a-fA-F]+/,\n }, //*/\n\n {\n begin: '\\\\b(' + COMMON_COMMANDS.split(' ').join('|') + ')([\\\\s\\[\\(]|\\])',\n returnBegin: true,\n contains: [\n {\n className: 'builtin-name', //'function',\n begin: /\\w+/,\n },\n ],\n },\n\n {\n className: 'built_in',\n variants: [\n {begin: '(\\\\.\\\\./|/|\\\\s)((' + OBJECTS.split(' ').join('|') + ');?\\\\s)+',relevance: 10,},\n {begin: /\\.\\./,},\n ],\n },//*/\n ]\n };\n};"],"sourceRoot":""}
|