mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-22 05:11:39 +01:00
Fix ** emulation wrt comments
This commit is contained in:
parent
a5e0bbcb62
commit
1cb6e1407c
@ -72,7 +72,7 @@ class Emulative extends \PhpParser\Lexer
|
|||||||
protected function preprocessCode($code) {
|
protected function preprocessCode($code) {
|
||||||
$code = str_replace('...', '~__EMU__ELLIPSIS__~', $code);
|
$code = str_replace('...', '~__EMU__ELLIPSIS__~', $code);
|
||||||
$code = preg_replace('((?<!/)\*\*=)', '~__EMU__POWEQUAL__~', $code);
|
$code = preg_replace('((?<!/)\*\*=)', '~__EMU__POWEQUAL__~', $code);
|
||||||
$code = preg_replace('((?<!/)\*\*)', '~__EMU__POW__~', $code);
|
$code = preg_replace('((?<!/)\*\*(?!/))', '~__EMU__POW__~', $code);
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, '5.4.0beta1', '<')) {
|
if (version_compare(PHP_VERSION, '5.4.0beta1', '<')) {
|
||||||
// binary notation (0b010101101001...)
|
// binary notation (0b010101101001...)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user