tools/cr/cr/visitor.py
def VisitNode(self, node):
    """Called for every node in the tree."""
    if not node.enabled:
      return self
    try:
      try:
        self.stack.append(node)
        self.StartNode()
        # Visit all the values first
        for key in self.KeysOf(node.values):
          self.Visit(key, node.values[key])
        # And now recurse into all the children
        for child in  node.children:
          self.VisitNode(child)
      finally:
        self.EndNode()
        self.stack.pop()
    except VisitComplete:
      if self.stack:
        # propagate back up the stack
        raise
    return self
Called for every node in the tree.
Called for every node in the tree.
Called for every node in the tree .
def VisitNode(self, node):
    if not node.enabled:
      return self
    try:
      try:
        self.stack.append(node)
        self.StartNode()
        for key in self.KeysOf(node.values):
          self.Visit(key, node.values[key])
        for child in  node.children:
          self.VisitNode(child)
      finally:
        self.EndNode()
        self.stack.pop()
    except VisitComplete:
      if self.stack:
        raise
    return self
def VisitNode ( self , node ) : if not node . enabled : return self try : try : self . stack . append ( node ) self . StartNode ( ) for key in self . KeysOf ( node . values ) : self . Visit ( key , node . values [ key ] ) for child in node . children : self . VisitNode ( child ) finally : self . EndNode ( ) self . stack . pop ( ) except VisitComplete : if self . stack : raise return self
Called for every node in the tree.
Called for every node in the tree .
"""Called for every node in the tree.""" # Visit all the values first # And now recurse into all the children # propagate back up the stack
self
node