public function visitIntegerNode(IntegerNode $node) { $val = $node->getValue(); return "{$val}:int"; }
public function visitIntegerNode(IntegerNode $node) { return $node->getValue(); }
public function visitIntegerNode(IntegerNode $node) { return new RationalNode($node->getValue(), 1); }
public function visitIntegerNode(IntegerNode $node) { return Complex::create($node->getValue(), 0); }
public function testCanCreateIntegerNode() { $node = new IntegerNode(1); $this->assertEquals($node->getValue(), 1); $node = new IntegerNode(-1); $this->assertEquals($node->getValue(), -1); $this->setExpectedException(\UnexpectedValueException::class); $node = new IntegerNode(1.2); }