@curved_ruler That could get unwieldy for very deep nesting so perhaps you could follow each parenthesis with a binary encoding of the depth using ( for 1 and ) for 0.
For instance, a 5th level '(' would be (()( and ')' would be )()(.
Feels like the sort of feature DreamBerd by @TodePond should have.