Merge pull request #250 from TysonAndre/fix-php7.3.0alpha4
Fix notices seen in PHP 7.3.0alpha4 (but not alpha3)
This commit is contained in:
Коммит
5123f9c190
|
@ -1034,7 +1034,7 @@ class Parser {
|
|||
$expression->children[] = $this->parseExpression($expression);
|
||||
}
|
||||
$expression->children[] = $this->eat1(TokenKind::CloseBraceToken);
|
||||
continue;
|
||||
break;
|
||||
case $startQuoteKind = $expression->startQuote->kind:
|
||||
case TokenKind::EndOfFileToken:
|
||||
case TokenKind::HeredocEnd:
|
||||
|
@ -1042,11 +1042,11 @@ class Parser {
|
|||
return $expression;
|
||||
case TokenKind::VariableName:
|
||||
$expression->children[] = $this->parseTemplateStringExpression($expression);
|
||||
continue;
|
||||
break;
|
||||
default:
|
||||
$expression->children[] = $this->getCurrentToken();
|
||||
$this->advanceToken();
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,11 +86,11 @@ class PhpTokenizer implements TokenStreamProviderInterface {
|
|||
case T_OPEN_TAG:
|
||||
$arr[] = new Token(TokenKind::ScriptSectionStartTag, $fullStart, $start, $pos-$fullStart);
|
||||
$start = $fullStart = $pos;
|
||||
continue;
|
||||
break;
|
||||
|
||||
case T_WHITESPACE:
|
||||
$start += $strlen;
|
||||
continue;
|
||||
break;
|
||||
|
||||
case T_STRING:
|
||||
$name = \strtolower($token[1]);
|
||||
|
@ -98,19 +98,19 @@ class PhpTokenizer implements TokenStreamProviderInterface {
|
|||
$newTokenKind = TokenStringMaps::RESERVED_WORDS[$name];
|
||||
$arr[] = new Token($newTokenKind, $fullStart, $start, $pos - $fullStart);
|
||||
$start = $fullStart = $pos;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
if (($tokenKind === T_COMMENT || $tokenKind === T_DOC_COMMENT) && $treatCommentsAsTrivia) {
|
||||
$start += $strlen;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
$newTokenKind = self::TOKEN_MAP[$tokenKind] ?? TokenKind::Unknown;
|
||||
$arr[] = new Token($newTokenKind, $fullStart, $start, $pos - $fullStart);
|
||||
$start = $fullStart = $pos;
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче