protected function yyn303($line, $docComment) { $this->yyval = new PHPParser_Node_Scalar_LNumber(PHPParser_Node_Scalar_LNumber::parse($this->yyastk[$this->yysp - (1 - 1)]), $line, $docComment); }
protected function yyn305($attributes) { $this->yyval = new PHPParser_Node_Scalar_LNumber(PHPParser_Node_Scalar_LNumber::parse($this->yyastk[$this->stackPos - (1 - 1)]), $attributes); }
private function createNumber($number) { if (is_int($number)) { $n = new \PHPParser_Node_Scalar_LNumber($number); $n->setAttribute('type', $this->registry->getNativeType('integer')); } else { if (is_double($number)) { $n = new \PHPParser_Node_Scalar_DNumber($number); $n->setAttribute('type', $this->registry->getNativeType('double')); } else { throw new \InvalidArgumentException('Invalid number: ' . var_export($number, true)); } } return $n; }