annotate vendor/nikic/php-parser/lib/PhpParser/Node/Expr/BinaryOp.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents c2387f117808
children
rev   line source
Chris@13 1 <?php declare(strict_types=1);
Chris@0 2
Chris@0 3 namespace PhpParser\Node\Expr;
Chris@0 4
Chris@0 5 use PhpParser\Node\Expr;
Chris@0 6
Chris@0 7 abstract class BinaryOp extends Expr
Chris@0 8 {
Chris@0 9 /** @var Expr The left hand side expression */
Chris@0 10 public $left;
Chris@0 11 /** @var Expr The right hand side expression */
Chris@0 12 public $right;
Chris@0 13
Chris@0 14 /**
Chris@16 15 * Constructs a binary operator node.
Chris@0 16 *
Chris@0 17 * @param Expr $left The left hand side expression
Chris@0 18 * @param Expr $right The right hand side expression
Chris@0 19 * @param array $attributes Additional attributes
Chris@0 20 */
Chris@13 21 public function __construct(Expr $left, Expr $right, array $attributes = []) {
Chris@0 22 parent::__construct($attributes);
Chris@0 23 $this->left = $left;
Chris@0 24 $this->right = $right;
Chris@0 25 }
Chris@0 26
Chris@13 27 public function getSubNodeNames() : array {
Chris@13 28 return ['left', 'right'];
Chris@0 29 }
Chris@13 30
Chris@13 31 /**
Chris@13 32 * Get the operator sigil for this binary operation.
Chris@13 33 *
Chris@13 34 * In the case there are multiple possible sigils for an operator, this method does not
Chris@13 35 * necessarily return the one used in the parsed code.
Chris@13 36 *
Chris@13 37 * @return string
Chris@13 38 */
Chris@13 39 abstract public function getOperatorSigil() : string;
Chris@0 40 }