def getNodeScope(node): """Return the nearest lexically enclosing node with scope.""" if nodeHasScope(node): return node.scope else: p = dka.getParentNode(node) return getNodeScope(p) if p is not None else None
def visit_ApplCase(self, node): if not (dka.getParentNode(node) is self.marker and dka.getParentIndex(node) == 0): assert() self.generic_visit(node)
def parentscope(self): """Return the next outer scope, or None if there isn't any.""" p = dka.getParentNode(self.node) return getNodeScope(p) if p is not None else None