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() { $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 getType() { return $this->value->getType(); }