Don't replace \ followed by { with NS_SEPARATOR

This commit is contained in:
nikic 2012-02-21 19:28:40 +01:00
parent b0883f2bb8
commit 168982a912

View File

@ -49,7 +49,7 @@ class PHPParser_Lexer_Emulative extends PHPParser_Lexer
// namespace separator (backslash not followed by some special characters,
// which are not valid after a NS separator, but would cause problems with
// escape sequence parsing if one would replace the backslash there)
$code = preg_replace('(\\\\(?!["\'`$\\\\]))', '~__EMU__NS__~', $code);
$code = preg_replace('(\\\\(?!["\'`${\\\\]))', '~__EMU__NS__~', $code);
// nowdoc (<<<'ABC'\ncontent\nABC;)
$code = preg_replace_callback(