update 1.0.8.0
Commits for version update
This commit is contained in:
2396
vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
vendored
2396
vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php
vendored
File diff suppressed because it is too large
Load Diff
1276
vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
vendored
1276
vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php
vendored
File diff suppressed because it is too large
Load Diff
@@ -351,7 +351,9 @@ abstract class ParserAbstract implements Parser
|
||||
&& ($idx = $this->actionBase[$state + $this->YYNLSTATES] + $symbol) >= 0
|
||||
&& $idx < $this->actionTableSize && $this->actionCheck[$idx] === $symbol
|
||||
) {
|
||||
if ($this->action[$idx] != $this->unexpectedTokenRule) {
|
||||
if ($this->action[$idx] != $this->unexpectedTokenRule
|
||||
&& $this->action[$idx] != $this->defaultAction
|
||||
) {
|
||||
if (count($expected) == 4) {
|
||||
/* Too many expected tokens */
|
||||
return array();
|
||||
|
@@ -849,9 +849,20 @@ class Standard extends PrettyPrinterAbstract
|
||||
protected function escapeString($string, $quote) {
|
||||
if (null === $quote) {
|
||||
// For doc strings, don't escape newlines
|
||||
return addcslashes($string, "\t\f\v$\\");
|
||||
$escaped = addcslashes($string, "\t\f\v$\\");
|
||||
} else {
|
||||
$escaped = addcslashes($string, "\n\r\t\f\v$" . $quote . "\\");
|
||||
}
|
||||
return addcslashes($string, "\n\r\t\f\v$" . $quote . "\\");
|
||||
|
||||
// Escape other control characters
|
||||
return preg_replace_callback('/([\0-\10\16-\37])(?=([0-7]?))/', function ($matches) {
|
||||
$oct = decoct(ord($matches[1]));
|
||||
if ($matches[2] !== '') {
|
||||
// If there is a trailing digit, use the full three character form
|
||||
return '\\' . str_pad($oct, 3, '0', STR_PAD_LEFT);
|
||||
}
|
||||
return '\\' . $oct;
|
||||
}, $escaped);
|
||||
}
|
||||
|
||||
protected function containsEndLabel($string, $label, $atStart = true, $atEnd = true) {
|
||||
|
Reference in New Issue
Block a user