Skip to content

Commit

Permalink
Fix 5.3-5.6 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Apr 1, 2022
1 parent 3610afb commit 471da18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Seld/JsonLint/JsonParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ public function parse($input, $flags = 0)
// use default actions if available
if (isset($this->defaultActions[$state])) {
$action = $this->defaultActions[$state];
assert(isset($symbol));
} else {
if ($symbol === null) {
$symbol = $this->lexer->lex();
Expand All @@ -247,6 +246,7 @@ public function parse($input, $flags = 0)

// handle parse error
if (!$action || !$action[0]) {
assert(isset($symbol));
if (!$recovering) {
// Report error
$expected = array();
Expand Down Expand Up @@ -335,6 +335,7 @@ public function parse($input, $flags = 0)

switch ($action[0]) {
case 1: // shift
assert(isset($symbol));
$this->stack[] = $symbol;
$this->vstack[] = $this->lexer->yytext;
$this->lstack[] = $this->lexer->yylloc;
Expand Down

0 comments on commit 471da18

Please sign in to comment.