Example #1
0
 public function visitBinaryMultiplicationNode(BinaryMultiplicationNode $node)
 {
     if ($this->visit($node->getA()) || $this->visit($node->getB())) {
         return true;
     }
     return $this->_evalIsZero($node);
 }
Example #2
0
 public function visitBinaryMultiplicationNode(BinaryMultiplicationNode $node)
 {
     return $this->_renderNode($this->_indent($this->depth + 1) . '<multiplication type="binary">' . PHP_EOL . implode(PHP_EOL, array_map(function (DerivableNodeInterface $child) {
         $v = new XMLVisitor($this->depth + 2);
         return $v->visit($child);
     }, [$node->getA(), $node->getB()])) . PHP_EOL . $this->_indent($this->depth + 1) . '</multiplication>');
 }
Example #3
0
 public function visitBinaryMultiplicationNode(BinaryMultiplicationNode $node)
 {
     $childVisitor = new self($node);
     $a = $node->getA();
     $b = $node->getB();
     return $this->_process($node, $a->accept($childVisitor) . ' * ' . $b->accept($childVisitor));
 }
Example #4
0
 public function visitBinaryMultiplicationNode(BinaryMultiplicationNode $node)
 {
     $x = new BinaryMultiplicationNode($this->visit($node->getA()), $node->getB());
     $y = new BinaryMultiplicationNode($node->getA(), $this->visit($node->getB()));
     return new AdditionNode($x, $y);
 }
Example #5
0
 public function visitBinaryMultiplicationNode(BinaryMultiplicationNode $node)
 {
     return $this->visit($node->getA()) * $this->visit($node->getB());
 }