summaryrefslogtreecommitdiff
path: root/rebuilder.py
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-02-17 09:38:49 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-02-17 09:38:49 +0100
commit4693a2b1c7d948e2036ce8d324d5f08fd7a16efe (patch)
treeb77dc72b5fd98d125927631438b4a601189f2d03 /rebuilder.py
parentfc5c916b68953364f03df49918c1a4c6218f4601 (diff)
downloadastroid-git-4693a2b1c7d948e2036ce8d324d5f08fd7a16efe.tar.gz
move _check_children to utils; don't call it
--HG-- branch : rebuild
Diffstat (limited to 'rebuilder.py')
-rw-r--r--rebuilder.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/rebuilder.py b/rebuilder.py
index fc16c7ea..997b4d27 100644
--- a/rebuilder.py
+++ b/rebuilder.py
@@ -27,29 +27,6 @@ from logilab.astng.infutils import YES, Instance
-def _check_children(node):
- """a helper function to check children - parent relations"""
- for child in node.get_children():
- ok = False
- if child is None:
- print "Hm, child of %s is None" % node
- continue
- if not hasattr(child, 'parent'):
- print " ERROR: %s has child %s %x with no parent" % (node, child, id(child))
- elif not child.parent:
- print " ERROR: %s has child %s %x with parent %r" % (node, child, id(child), child.parent)
- elif child.parent is not node:
- print " ERROR: %s %x has child %s %x with wrong parent %s" % (node,
- id(node), child, id(child), child.parent)
- else:
- ok = True
- if not ok:
- print "lines;", node.lineno, child.lineno
- print "of module", node.root(), node.root().name
- raise ASTNGBuildingException
- _check_children(child)
-
-
class RebuildVisitor(ASTVisitor):
"""Visitor to transform an AST to an ASTNG
"""
@@ -70,8 +47,6 @@ class RebuildVisitor(ASTVisitor):
def walk(self, node):
"""start the walk down the tree and do some work after it"""
newnode = self.visit(node, None)
- _check_children(newnode) # FIXME : remove this asap
-
# handle delayed assattr nodes
delay_assattr = self.delayed_assattr
for node in self._delayed_assattr: