if root data has one more than its parent then increase current length
if ( root . data == expected ) : NEW_LINE INDENT curLength += 1 NEW_LINE DEDENT else : NEW_LINE INDENT curLength = 1 NEW_LINE DEDENT