diff options
author | Emile Anclin <emile.anclin@logilab.fr> | 2010-01-21 12:58:04 +0100 |
---|---|---|
committer | Emile Anclin <emile.anclin@logilab.fr> | 2010-01-21 12:58:04 +0100 |
commit | c95ac3d265283b30303f57ae6e651e7893dcd884 (patch) | |
tree | 805587d41f4f1d64d365964303dd79d9c45268a2 /rebuilder.py | |
parent | 401cd98f5f0268a232a27bf29351fd0ad021ca1c (diff) | |
download | astroid-git-c95ac3d265283b30303f57ae6e651e7893dcd884.tar.gz |
factorize and remove dead code
--HG--
branch : rebuild
Diffstat (limited to 'rebuilder.py')
-rw-r--r-- | rebuilder.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rebuilder.py b/rebuilder.py index 299f4aa4..e630826c 100644 --- a/rebuilder.py +++ b/rebuilder.py @@ -129,6 +129,16 @@ class RebuildVisitor(ASTVisitor): def delayed_class(self, node): node.parent.frame().set_local(node.name, node) + def visit_const(self, node): + """visit a Const node by returning a fresh instance of it""" + newnode = nodes.Const(node.value) + return newnode + + def visit_continue(self, node): + """visit a Continue node by returning a fresh instance of it""" + newnode = nodes.Continue() + return newnode + def visit_decorators(self, node): # TODO """visiting an Decorators node""" return self._visit_decorators(node) |