Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for yield expressions (PHP 5.5)
This adds a new Yield expression type, with subnodes key and value.
- Loading branch information
Showing
7 changed files
with
1,328 additions
and
1,008 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
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,25 @@ | ||
<?php | ||
|
||
/** | ||
* @property null|PHPParser_Node_Expr $value Value expression | ||
* @property null|PHPParser_Node_Expr $key Key expression | ||
*/ | ||
class PHPParser_Node_Expr_Yield extends PHPParser_Node_Expr | ||
{ | ||
/** | ||
* Constructs a yield expression node. | ||
* | ||
* @param null|PHPParser_Node_Expr $value ´ Value expression | ||
* @param null|PHPParser_Node_Expr $key Key expression | ||
* @param array $attributes Additional attributes | ||
*/ | ||
public function __construct(PHPParser_Node_Expr $value = null, PHPParser_Node_Expr $key = null, array $attributes = array()) { | ||
parent::__construct( | ||
array( | ||
'key' => $key, | ||
'value' => $value, | ||
), | ||
$attributes | ||
); | ||
} | ||
} |
Oops, something went wrong.