Skip to content

Commit e926efd

Browse files
committed
Fix regex
1 parent 17d1e73 commit e926efd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/PhpParser/Lexer/Emulative.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ protected function requiresEmulation($code) {
6767
return false;
6868
}
6969

70-
if (preg_match('/\?\?|<=>|yield[ \n\r\t]+from/', $code)) {
70+
if (preg_match('(\?\?|<=>|yield[ \n\r\t]+from)', $code)) {
7171
return true;
7272
}
7373

7474
if (version_compare(PHP_VERSION, self::PHP_5_6, '>=')) {
7575
return false;
7676
}
7777

78-
return preg_match('/\.\.\.|(?<!/)\*\*(?!/)/', $code);
78+
return preg_match('(\.\.\.|(?<!/)\*\*(?!/))', $code);
7979
}
8080

8181
/*

0 commit comments

Comments
 (0)