Lines Matching full:visitor
422 def visitor(tree, parent, childIndex, labels):
425 self.visit(t, ttype, visitor)
447 def visitor(tree, parent, childIndex, label):
451 self.visit(t, rootTokenType, visitor)
456 def visit(self, tree, what, visitor):
457 """Visit every node in tree matching what, invoking the visitor.
462 with visit(t, ttype, visitor) so nil-rooted patterns are not allowed.
467 The labels arg of the visitor action method is never set (it's None)
473 self._visitType(tree, None, 0, what, visitor)
476 self._visitPattern(tree, what, visitor)
482 def _visitType(self, t, parent, childIndex, ttype, visitor):
489 visitor(t, parent, childIndex, None)
493 self._visitType(child, t, i, ttype, visitor)
496 def _visitPattern(self, tree, pattern, visitor):
516 visitor(tree, parent, childIndex, labels)