protected SimplifyNode ( PHPParser_Node_Expr $Node ) | ||
$Node | PHPParser_Node_Expr |
protected function SimplifyNode(\PHPParser_Node_Expr $Node)
{
if ($this->IsConstant($Node->left) && $this->IsConstant($Node->right)) {
$Left = $this->GetValue($Node->left);
$Right = $this->GetValue($Node->right);
$BinaryOperation = $this->BinaryOperation;
$Value = $BinaryOperation($Left, $Right);
return $this->Constant($Value);
}
}