blob: b5b84198304ab405ae8a7ab52c056343c9f0e205 [file] [log] [blame]
{"version":3,"sources":["webpack:///./node_modules/react-syntax-highlighter/node_modules/highlight.js/lib/languages/zephir.js"],"names":["module","exports","hljs","STRING","className","contains","BACKSLASH_ESCAPE","variants","inherit","APOS_STRING_MODE","illegal","QUOTE_STRING_MODE","TITLE_MODE","UNDERSCORE_TITLE_MODE","NUMBER","BINARY_NUMBER_MODE","C_NUMBER_MODE","KEYWORDS","name","aliases","keywords","C_LINE_COMMENT_MODE","COMMENT","begin","end","beginKeywords","excludeEnd","C_BLOCK_COMMENT_MODE"],"mappings":"8EAuFAA,EAAOC,QAjFP,SAAgBC,GACd,IAAIC,EAAS,CACXC,UAAW,SACXC,SAAU,CAACH,EAAKI,kBAChBC,SAAU,CAACL,EAAKM,QAAQN,EAAKO,iBAAkB,CAC7CC,QAAS,OACPR,EAAKM,QAAQN,EAAKS,kBAAmB,CACvCD,QAAS,SAGTE,EAAaV,EAAKW,sBAClBC,EAAS,CACXP,SAAU,CAACL,EAAKa,mBAAoBb,EAAKc,gBAEvCC,EACJ,sfAWA,MAAO,CACLC,KAAM,SACNC,QAAS,CAAC,OACVC,SAAUH,EACVZ,SAAU,CAACH,EAAKmB,oBAAqBnB,EAAKoB,QAAQ,OAAQ,OAAQ,CAChEjB,SAAU,CAAC,CACTD,UAAW,SACXmB,MAAO,iBAEP,CACFnB,UAAW,SACXmB,MAAO,uBACPC,IAAK,SACLnB,SAAU,CAACH,EAAKI,mBACf,CAEDiB,MAAO,oDACN,CACDnB,UAAW,WACXqB,cAAe,cACfD,IAAK,OACLE,YAAY,EACZhB,QAAS,YACTL,SAAU,CAACO,EAAY,CACrBR,UAAW,SACXmB,MAAO,MACPC,IAAK,MACLJ,SAAUH,EACVZ,SAAU,CAAC,OAAQH,EAAKyB,qBAAsBxB,EAAQW,MAEvD,CACDV,UAAW,QACXqB,cAAe,kBACfD,IAAK,IACLE,YAAY,EACZhB,QAAS,WACTL,SAAU,CAAC,CACToB,cAAe,sBACdb,IACF,CACDa,cAAe,YACfD,IAAK,IACLd,QAAS,QACTL,SAAU,CAACO,IACV,CACDa,cAAe,MACfD,IAAK,IACLnB,SAAU,CAACO,IACV,CACDW,MAAO,MAENpB,EAAQW","file":"react-syntax-highlighter_languages_highlight_zephir-6d33a35804681b56ac4c.js","sourcesContent":["/*\n Language: Zephir\n Description: Zephir, an open source, high-level language designed to ease the creation and maintainability of extensions for PHP with a focus on type and memory safety.\n Author: Oleg Efimov <efimovov@gmail.com>\n Website: https://zephir-lang.com/en\n */\nfunction zephir(hljs) {\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE],\n variants: [hljs.inherit(hljs.APOS_STRING_MODE, {\n illegal: null\n }), hljs.inherit(hljs.QUOTE_STRING_MODE, {\n illegal: null\n })]\n };\n var TITLE_MODE = hljs.UNDERSCORE_TITLE_MODE;\n var NUMBER = {\n variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]\n };\n var KEYWORDS = // classes and objects\n 'namespace class interface use extends ' + 'function return ' + 'abstract final public protected private static deprecated ' + // error handling\n 'throw try catch Exception ' + // keyword-ish things their website does NOT seem to highlight (in their own snippets)\n // 'typeof fetch in ' +\n // operators/helpers\n 'echo empty isset instanceof unset ' + // assignment/variables\n 'let var new const self ' + // control\n 'require ' + 'if else elseif switch case default ' + 'do while loop for continue break ' + 'likely unlikely ' + // magic constants\n // https://github.com/phalcon/zephir/blob/master/Library/Expression/Constants.php\n '__LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ ' + // types - https://docs.zephir-lang.com/0.12/en/types\n 'array boolean float double integer object resource string ' + 'char long unsigned bool int uint ulong uchar ' + // built-ins\n 'true false null undefined';\n return {\n name: 'Zephir',\n aliases: ['zep'],\n keywords: KEYWORDS,\n contains: [hljs.C_LINE_COMMENT_MODE, hljs.COMMENT('/\\\\*', '\\\\*/', {\n contains: [{\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }]\n }), {\n className: 'string',\n begin: '<<<[\\'\"]?\\\\w+[\\'\"]?$',\n end: '^\\\\w+;',\n contains: [hljs.BACKSLASH_ESCAPE]\n }, {\n // swallow composed identifiers to avoid parsing them as keywords\n begin: /(::|->)+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/\n }, {\n className: 'function',\n beginKeywords: 'function fn',\n end: /[;{]/,\n excludeEnd: true,\n illegal: '\\\\$|\\\\[|%',\n contains: [TITLE_MODE, {\n className: 'params',\n begin: '\\\\(',\n end: '\\\\)',\n keywords: KEYWORDS,\n contains: ['self', hljs.C_BLOCK_COMMENT_MODE, STRING, NUMBER]\n }]\n }, {\n className: 'class',\n beginKeywords: 'class interface',\n end: '{',\n excludeEnd: true,\n illegal: /[:\\(\\$\"]/,\n contains: [{\n beginKeywords: 'extends implements'\n }, TITLE_MODE]\n }, {\n beginKeywords: 'namespace',\n end: ';',\n illegal: /[\\.']/,\n contains: [TITLE_MODE]\n }, {\n beginKeywords: 'use',\n end: ';',\n contains: [TITLE_MODE]\n }, {\n begin: '=>' // No markup, just a relevance booster\n\n }, STRING, NUMBER]\n };\n}\n\nmodule.exports = zephir;"],"sourceRoot":""}