public function getTempVariable($type, CompilationContext $compilationContext)
    {
        $compilationContext = $compilationContext ?: $this->compilationContext;

        $tempVar = $this->getNextTempVar();
        $variable = $this->addVariable($type, '_'.$tempVar, $compilationContext);
        $variable->setTemporal(true);

        return $variable;
    }