mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-03-15 03:39:50 +01:00
Fix computation of expected tokens in parse errors
This commit is contained in:
parent
96cbd48df6
commit
81f7da3b23
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user