protected function _flushVariables($node)
    {
        if (!$this->_variables[$this->_depth]) {
            return;
        }

        $body = '';
        foreach ($this->_variables[$this->_depth] as $variable) {
            $body .= $variable['name'] . $variable['patch'];
        }

        if (!$node->inPhp) {
            $body = '<?php ' . $body . ' ?>';
        }

        $patch = new NodeDef($body, 'code');
        $patch->parent = $node;
        $patch->function = $node->function;
        $patch->namespace = $node->namespace;
        array_unshift($node->tree, $patch);
        $this->_variables[$this->_depth] = [];
    }