Skip to content

Commit

Permalink
Add E_EXIT to the list of non-operand tokens of the OperatorSpacing s…
Browse files Browse the repository at this point in the history
…niff
  • Loading branch information
morozov committed Sep 4, 2020
1 parent 1371c59 commit fc6d400
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function register()
$this->nonOperandTokens += [
T_RETURN => T_RETURN,
T_ECHO => T_ECHO,
T_EXIT => T_EXIT,
T_PRINT => T_PRINT,
T_YIELD => T_YIELD,
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,5 +463,7 @@ $a = [$a, - $b];
$a = $a[- $b];
$a = $a ? - $b : - $b;

exit -1;

/* Intentional parse error. This has to be the last test in the file. */
$a = 10 +
Original file line number Diff line number Diff line change
Expand Up @@ -457,5 +457,7 @@ $a = [$a, - $b];
$a = $a[- $b];
$a = $a ? - $b : - $b;

exit -1;

/* Intentional parse error. This has to be the last test in the file. */
$a = 10 +

0 comments on commit fc6d400

Please sign in to comment.