@@ -85,7 +85,7 @@ public function __construct($sourceName, $sourceIndex = 0)
8585 $ commentMultiRight = '\*\/ ' ;
8686
8787 self ::$ commentPattern = $ commentMultiLeft . '.*? ' . $ commentMultiRight ;
88- self ::$ whitePattern = '/ ' . $ commentSingle . '[^\n]*\s*|( ' . self ::$ commentPattern . ')\s*|\s+/Ais ' ;
88+ self ::$ whitePattern = '/ ' . $ commentSingle . '[^\n]*\s*|( ' . self ::$ commentPattern . ')\s*|\s+/AisuS ' ;
8989 }
9090 }
9191
@@ -762,7 +762,7 @@ protected function peek($regex, &$out, $from = null)
762762 $ from = $ this ->count ;
763763 }
764764
765- $ r = '/ ' . $ regex . '/Ais ' ;
765+ $ r = '/ ' . $ regex . '/Aisu ' ;
766766 $ result = preg_match ($ r , $ this ->buffer , $ out , null , $ from );
767767
768768 return $ result ;
@@ -842,7 +842,7 @@ protected function match($regex, &$out, $eatWhitespace = null)
842842 $ eatWhitespace = $ this ->eatWhiteDefault ;
843843 }
844844
845- $ r = '/ ' . $ regex . '/Ais ' ;
845+ $ r = '/ ' . $ regex . '/Aisu ' ;
846846
847847 if (preg_match ($ r , $ this ->buffer , $ out , null , $ this ->count )) {
848848 $ this ->count += strlen ($ out [0 ]);
@@ -2235,7 +2235,7 @@ protected function variable(&$out)
22352235 protected function keyword (&$ word , $ eatWhitespace = null )
22362236 {
22372237 if ($ this ->match (
2238- '(([\w_\-\*!" \']|[ \\\\].)([\w\-_" \']|[ \\\\].)*) ' ,
2238+ '(([\pL\ w_\-\*!" \']|[ \\\\].)([\pL \w\-_" \']|[ \\\\].)*) ' ,
22392239 $ m ,
22402240 $ eatWhitespace
22412241 )) {
@@ -2256,7 +2256,7 @@ protected function keyword(&$word, $eatWhitespace = null)
22562256 */
22572257 protected function placeholder (&$ placeholder )
22582258 {
2259- if ($ this ->match ('([\w\-_]+|#[{][$][\w\-_]+[}]) ' , $ m )) {
2259+ if ($ this ->match ('([\pL\ w\-_]+|#[{][$][\pL \w\-_]+[}]) ' , $ m )) {
22602260 $ placeholder = $ m [1 ];
22612261
22622262 return true ;
0 commit comments