public function getType()
 {
     if ($this->leftValue->getType() == TES5BasicType::T_FLOAT() || $this->rightValue->getType() == TES5BasicType::T_FLOAT()) {
         return TES5BasicType::T_FLOAT();
     }
     return TES5BasicType::T_INT();
 }
 public function output()
 {
     $true = new TES5Bool(true);
     $operator = TES5ArithmeticExpressionOperator::OPERATOR_EQUAL();
     $outputValue = implode(' ', $this->value->output());
     $trueOutputValue = implode(' ', $true->output());
     return ['(' . $outputValue . ' ' . $operator->value() . ' ' . $trueOutputValue . ')'];
 }
 public function output()
 {
     $leftOutput = $this->leftValue->output();
     $leftOutput = $leftOutput[0];
     $rightOutput = $this->rightValue->output();
     $rightOutput = $rightOutput[0];
     return ['(' . $leftOutput . ' ' . $this->operator->value() . ' ' . $rightOutput . ')'];
 }
 public function output()
 {
     $referenceOutput = $this->reference->output();
     $referenceOutput = $referenceOutput[0];
     $valueOutput = $this->value->output();
     $valueOutput = $valueOutput[0];
     $code = $referenceOutput . ' = ' . $valueOutput;
     if ($this->reference->getType() != $this->value->getType() && !$this->value instanceof TES5None) {
         $code .= " as " . $this->reference->getType()->output();
     }
     $codeLines = [$code];
     return $codeLines;
 }
 public function inferenceObjectByAssignation(TES5Referencer $reference, TES5Value $value, TES5MultipleScriptsScope $multipleScriptsScope)
 {
     if ($reference->getReferencesTo() !== null && !$reference->getType()->isPrimitive()) {
         $this->inferenceType($reference->getReferencesTo(), $value->getType()->getNativeType(), $multipleScriptsScope);
     }
 }
 public function output()
 {
     return [$this->value->output()];
 }