blob: db2ba7a9290f12f621df38dc587c502294e9dd50 [file] [log] [blame]
{"version":3,"sources":["webpack:///./node_modules/react-syntax-highlighter/node_modules/highlight.js/lib/languages/php.js"],"names":["module","exports","hljs","VARIABLE","begin","PREPROCESSOR","className","variants","relevance","SUBST","end","SINGLE_QUOTED","inherit","APOS_STRING_MODE","illegal","DOUBLE_QUOTED","QUOTE_STRING_MODE","contains","concat","HEREDOC","END_SAME_AS_BEGIN","STRING","BACKSLASH_ESCAPE","NUMBER","BINARY_NUMBER_MODE","C_NUMBER_MODE","KEYWORDS","keyword","literal","built_in","aliases","case_insensitive","keywords","HASH_COMMENT_MODE","COMMENT","endsWithParent","beginKeywords","excludeEnd","UNDERSCORE_TITLE_MODE","excludeBegin","C_BLOCK_COMMENT_MODE"],"mappings":"8EAiJAA,EAAOC,QArIP,SAAaC,GACX,IAAIC,EAAW,CACbC,MAAO,oCAELC,EAAe,CACjBC,UAAW,OACXC,SAAU,CAAC,CACTH,MAAO,SACPI,UAAW,IAEb,CACEJ,MAAO,WACN,CACDA,MAAO,SAIPK,EAAQ,CACVH,UAAW,QACXC,SAAU,CAAC,CACTH,MAAO,SACN,CACDA,MAAO,OACPM,IAAK,QAGLC,EAAgBT,EAAKU,QAAQV,EAAKW,iBAAkB,CACtDC,QAAS,OAEPC,EAAgBb,EAAKU,QAAQV,EAAKc,kBAAmB,CACvDF,QAAS,KACTG,SAAUf,EAAKc,kBAAkBC,SAASC,OAAOT,KAE/CU,EAAUjB,EAAKkB,kBAAkB,CACnChB,MAAO,mBACPM,IAAK,gBACLO,SAAUf,EAAKc,kBAAkBC,SAASC,OAAOT,KAE/CY,EAAS,CACXf,UAAW,SACXW,SAAU,CAACf,EAAKoB,iBAAkBjB,GAClCE,SAAU,CAACL,EAAKU,QAAQD,EAAe,CACrCP,MAAO,KACPM,IAAK,MACHR,EAAKU,QAAQG,EAAe,CAC9BX,MAAO,KACPM,IAAK,MACHK,EAAeJ,EAAeQ,IAEhCI,EAAS,CACXhB,SAAU,CAACL,EAAKsB,mBAAoBtB,EAAKuB,gBAEvCC,EAAW,CACbC,QAEA,0lBAQAC,QAAS,kBACTC,SAEA,myCAOF,MAAO,CACLC,QAAS,CAAC,MAAO,OAAQ,OAAQ,OAAQ,OAAQ,OAAQ,QACzDC,kBAAkB,EAClBC,SAAUN,EACVT,SAAU,CAACf,EAAK+B,kBAAmB/B,EAAKgC,QAAQ,KAAM,IAAK,CACzDjB,SAAU,CAACZ,KACTH,EAAKgC,QAAQ,OAAQ,OAAQ,CAC/BjB,SAAU,CAAC,CACTX,UAAW,SACXF,MAAO,iBAEPF,EAAKgC,QAAQ,uBAAuB,EAAO,CAC7CC,gBAAgB,EAChBH,SAAU,oBACR3B,EAAc,CAChBC,UAAW,UACXF,MAAO,YACND,EAAU,CAEXC,MAAO,oDACN,CACDE,UAAW,WACX8B,cAAe,cACf1B,IAAK,OACL2B,YAAY,EACZvB,QAAS,UACTG,SAAU,CAACf,EAAKoC,sBAAuB,CACrChC,UAAW,SACXF,MAAO,MACPM,IAAK,MACL6B,cAAc,EACdF,YAAY,EACZL,SAAUN,EACVT,SAAU,CAAC,OAAQd,EAAUD,EAAKsC,qBAAsBnB,EAAQE,MAEjE,CACDjB,UAAW,QACX8B,cAAe,kBACf1B,IAAK,IACL2B,YAAY,EACZvB,QAAS,WACTG,SAAU,CAAC,CACTmB,cAAe,sBACdlC,EAAKoC,wBACP,CACDF,cAAe,YACf1B,IAAK,IACLI,QAAS,QACTG,SAAU,CAACf,EAAKoC,wBACf,CACDF,cAAe,MACf1B,IAAK,IACLO,SAAU,CAACf,EAAKoC,wBACf,CACDlC,MAAO,MAENiB,EAAQE","file":"react-syntax-highlighter_languages_highlight_php-2f43f7b251379aba9b29.js","sourcesContent":["/*\nLanguage: PHP\nAuthor: Victor Karamzin <Victor.Karamzin@enterra-inc.com>\nContributors: Evgeny Stepanischev <imbolk@gmail.com>, Ivan Sagalaev <maniac@softwaremaniacs.org>\nWebsite: https://www.php.net\nCategory: common\n*/\n\n/**\n * @param {HLJSApi} hljs\n * @returns {LanguageDetail}\n * */\nfunction php(hljs) {\n var VARIABLE = {\n begin: '\\\\$+[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*'\n };\n var PREPROCESSOR = {\n className: 'meta',\n variants: [{\n begin: /<\\?php/,\n relevance: 10\n }, // boost for obvious PHP\n {\n begin: /<\\?[=]?/\n }, {\n begin: /\\?>/\n } // end php tag\n ]\n };\n var SUBST = {\n className: 'subst',\n variants: [{\n begin: /\\$\\w+/\n }, {\n begin: /\\{\\$/,\n end: /\\}/\n }]\n };\n var SINGLE_QUOTED = hljs.inherit(hljs.APOS_STRING_MODE, {\n illegal: null\n });\n var DOUBLE_QUOTED = hljs.inherit(hljs.QUOTE_STRING_MODE, {\n illegal: null,\n contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST)\n });\n var HEREDOC = hljs.END_SAME_AS_BEGIN({\n begin: /<<<[ \\t]*(\\w+)\\n/,\n end: /[ \\t]*(\\w+)\\b/,\n contains: hljs.QUOTE_STRING_MODE.contains.concat(SUBST)\n });\n var STRING = {\n className: 'string',\n contains: [hljs.BACKSLASH_ESCAPE, PREPROCESSOR],\n variants: [hljs.inherit(SINGLE_QUOTED, {\n begin: \"b'\",\n end: \"'\"\n }), hljs.inherit(DOUBLE_QUOTED, {\n begin: 'b\"',\n end: '\"'\n }), DOUBLE_QUOTED, SINGLE_QUOTED, HEREDOC]\n };\n var NUMBER = {\n variants: [hljs.BINARY_NUMBER_MODE, hljs.C_NUMBER_MODE]\n };\n var KEYWORDS = {\n keyword: // Magic constants:\n // <https://www.php.net/manual/en/language.constants.predefined.php>\n '__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ ' + // Function that look like language construct or language construct that look like function:\n // List of keywords that may not require parenthesis\n 'die echo exit include include_once print require require_once ' + // These are not language construct (function) but operate on the currently-executing function and can access the current symbol table\n // 'compact extract func_get_arg func_get_args func_num_args get_called_class get_parent_class ' +\n // Other keywords:\n // <https://www.php.net/manual/en/reserved.php>\n // <https://www.php.net/manual/en/language.types.type-juggling.php>\n 'array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match new object or private protected public real return string switch throw trait try unset use var void while xor yield',\n literal: 'false null true',\n built_in: // Standard PHP library:\n // <https://www.php.net/manual/en/book.spl.php>\n 'Error|0 ' + // error is too common a name esp since PHP is case in-sensitive\n 'AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ' + // Reserved interfaces:\n // <https://www.php.net/manual/en/reserved.interfaces.php>\n 'ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference ' + // Reserved classes:\n // <https://www.php.net/manual/en/reserved.classes.php>\n 'Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass'\n };\n return {\n aliases: ['php', 'php3', 'php4', 'php5', 'php6', 'php7', 'php8'],\n case_insensitive: true,\n keywords: KEYWORDS,\n contains: [hljs.HASH_COMMENT_MODE, hljs.COMMENT('//', '$', {\n contains: [PREPROCESSOR]\n }), hljs.COMMENT('/\\\\*', '\\\\*/', {\n contains: [{\n className: 'doctag',\n begin: '@[A-Za-z]+'\n }]\n }), hljs.COMMENT('__halt_compiler.+?;', false, {\n endsWithParent: true,\n keywords: '__halt_compiler'\n }), PREPROCESSOR, {\n className: 'keyword',\n begin: /\\$this\\b/\n }, VARIABLE, {\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: 'fn function',\n end: /[;{]/,\n excludeEnd: true,\n illegal: '[$%\\\\[]',\n contains: [hljs.UNDERSCORE_TITLE_MODE, {\n className: 'params',\n begin: '\\\\(',\n end: '\\\\)',\n excludeBegin: true,\n excludeEnd: true,\n keywords: KEYWORDS,\n contains: ['self', VARIABLE, 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 }, hljs.UNDERSCORE_TITLE_MODE]\n }, {\n beginKeywords: 'namespace',\n end: ';',\n illegal: /[\\.']/,\n contains: [hljs.UNDERSCORE_TITLE_MODE]\n }, {\n beginKeywords: 'use',\n end: ';',\n contains: [hljs.UNDERSCORE_TITLE_MODE]\n }, {\n begin: '=>' // No markup, just a relevance booster\n\n }, STRING, NUMBER]\n };\n}\n\nmodule.exports = php;"],"sourceRoot":""}