public function resolveParenthesis(NodeContract $node)
    {
        foreach ($node->getChildren() as $child) {
            $this->resolveParenthesis($child);
        }

        if (!$node instanceof Nodes\TextNode) {
            return;
        }

        $value = '';
        $positions = [];

        foreach ($this->regex as $class => $regex) {
            preg_match($regex, $node->getValue(), $match, PREG_OFFSET_CAPTURE);

            if ($match) {
                $new_node = new $class();
                $new_node->setValue($match[0][0]);

                $start = $match[0][1];
                $length = strlen($match[0][0]);

                $nodes = $this->splitNode(Nodes\TextNode::class, $node, $new_node, $start, $start + $length);

                $this->resolveParenthesis($nodes[count($nodes) - 1]);
            }
        }
    }