public function addGlobalVariable(Variable $variable) { assert($this->hasParentScope(), "No global scope available. This should not happen."); $this->getParentScope()->addGlobalVariable($variable); }