'Print out a whole tree not just a node'

def toStringTree(self):

    if (len(self.children) == 0):
        return self.toString()
    buf = []
    if (not self.isNil()):
        buf.append('(')
        buf.append(self.toString())
        buf.append('    ')
    for (i, child) in enumerate(self.children):
        if (i > 0):
            buf.append('    ')
        buf.append(child.toStringTree())
    if (not self.isNil()):
        buf.append(')')
    return ''.join(buf)
