-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Error node for this purpose.
- Loading branch information
Showing
6 changed files
with
610 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace PhpParser\Node\Expr; | ||
|
||
use PhpParser\Node\Expr; | ||
|
||
/** | ||
* Error node used during parsing with error recovery. | ||
* | ||
* An error node may be placed at a position where an expression is required, but an error occurred. | ||
* Error nodes will not be present if the parser is run in throwOnError mode (the default). | ||
*/ | ||
class Error extends Expr | ||
{ | ||
/** | ||
* Constructs an error node. | ||
* | ||
* @param array $attributes Additional attributes | ||
*/ | ||
public function __construct(array $attributes = array()) { | ||
parent::__construct($attributes); | ||
} | ||
|
||
public function getSubNodeNames() { | ||
return array(); | ||
} | ||
} |
Oops, something went wrong.