Skip to content

Commit

Permalink
Sync flexible heredoc emulation with label fix
Browse files Browse the repository at this point in the history
This was recently fixed in PHP via
php/php-src@3107088
so we should fix it here as well.

I'm not adding a dedicated test as it will fail until new PHP versions
are released. This is indirectly tested through the php-src tester.
  • Loading branch information
nikic committed Aug 30, 2019
1 parent e612609 commit 5644a91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/PhpParser/Lexer/Emulative.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Emulative extends Lexer
const FLEXIBLE_DOC_STRING_REGEX = <<<'REGEX'
/<<<[ \t]*(['"]?)([a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*)\1\r?\n
(?:.*\r?\n)*?
(?<indentation>\h*)\2(?![a-zA-Z_\x80-\xff])(?<separator>(?:;?[\r\n])?)/x
(?<indentation>\h*)\2(?![a-zA-Z0-9_\x80-\xff])(?<separator>(?:;?[\r\n])?)/x
REGEX;

/** @var mixed[] Patches used to reverse changes introduced in the code */
Expand Down

0 comments on commit 5644a91

Please sign in to comment.