2016-12-24 23:52:33 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace PhpParser\Node\Stmt;
|
|
|
|
|
|
|
|
use PhpParser\Node;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents statements of type "expr;"
|
|
|
|
*/
|
|
|
|
class Expression extends Node\Stmt
|
|
|
|
{
|
|
|
|
/** @var Node\Expr Expression */
|
|
|
|
public $expr;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs an expression statement.
|
|
|
|
*
|
|
|
|
* @param Node\Expr $expr Expression
|
|
|
|
* @param array $attributes Additional attributes
|
|
|
|
*/
|
|
|
|
public function __construct(Node\Expr $expr, array $attributes = array()) {
|
|
|
|
parent::__construct($attributes);
|
|
|
|
$this->expr = $expr;
|
|
|
|
}
|
|
|
|
|
2017-04-28 21:40:59 +02:00
|
|
|
public function getSubNodeNames() : array {
|
2016-12-24 23:52:33 +01:00
|
|
|
return array('expr');
|
|
|
|
}
|
|
|
|
}
|