:internal: add a parenthesis node and some methods to determine if an element is a conatainer or a leaf.