'Dispatcher function, dispatching tree type T to method _T.'

def dispatch(self, tree):

    if isinstance(tree, list):
        for t in tree:
            self.dispatch(t)
        return
    meth = getattr(self, ('_' + tree.__class__.__name__))
    meth(tree)
