summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py191
1 files changed, 1 insertions, 190 deletions
diff --git a/utils.py b/utils.py
index 1f2dd52..b9db89e 100644
--- a/utils.py
+++ b/utils.py
@@ -38,195 +38,6 @@ __docformat__ = "restructuredtext en"
from logilab.astng.exceptions import ASTNGBuildingException
-class ASTVisitor(object):
- """Abstract Base Class for Python AST Visitors.
-
- Visitors inheriting from ASTVisitors could visit
- compiler.ast, _ast or astng trees.
-
- Not all methods will have to be implemented;
- so some methods are just empty interfaces for catching
- cases where we don't want to do anything on the
- concerned node.
- """
-
- def visit_arguments(self, node):
- """dummy method for visiting an Arguments node"""
-
- def visit_assattr(self, node):
- """dummy method for visiting an AssAttr node"""
-
- def visit_assert(self, node):
- """dummy method for visiting an Assert node"""
-
- def visit_assign(self, node):
- """dummy method for visiting an Assign node"""
-
- def visit_assname(self, node):
- """dummy method for visiting an AssName node"""
-
- def visit_augassign(self, node):
- """dummy method for visiting an AugAssign node"""
-
- def visit_backquote(self, node):
- """dummy method for visiting an Backquote node"""
-
- def visit_binop(self, node):
- """dummy method for visiting an BinOp node"""
-
- def visit_boolop(self, node):
- """dummy method for visiting an BoolOp node"""
-
- def visit_break(self, node):
- """dummy method for visiting an Break node"""
-
- def visit_callfunc(self, node):
- """dummy method for visiting an CallFunc node"""
-
- def visit_class(self, node):
- """dummy method for visiting an Class node"""
-
- def visit_compare(self, node):
- """dummy method for visiting an Compare node"""
-
- def visit_comprehension(self, node):
- """dummy method for visiting an Comprehension node"""
-
- def visit_const(self, node):
- """dummy method for visiting an Const node"""
-
- def visit_continue(self, node):
- """dummy method for visiting an Continue node"""
-
- def visit_decorators(self, node):
- """dummy method for visiting an Decorators node"""
-
- def visit_delattr(self, node):
- """dummy method for visiting an DelAttr node"""
-
- def visit_delete(self, node):
- """dummy method for visiting an Delete node"""
-
- def visit_delname(self, node):
- """dummy method for visiting an DelName node"""
-
- def visit_dict(self, node):
- """dummy method for visiting an Dict node"""
-
- def visit_dictcomp(self, node):
- """dummy method for visiting an DictComp node"""
-
- def visit_discard(self, node):
- """dummy method for visiting an Discard node"""
-
- def visit_emptynode(self, node):
- """dummy method for visiting an EmptyNode node"""
-
- def visit_excepthandler(self, node):
- """dummy method for visiting an ExceptHandler node"""
-
- def visit_ellipsis(self, node):
- """dummy method for visiting an Ellipsis node"""
-
- def visit_empty(self, node):
- """dummy method for visiting an Empty node"""
-
- def visit_exec(self, node):
- """dummy method for visiting an Exec node"""
-
- def visit_extslice(self, node):
- """dummy method for visiting an ExtSlice node"""
-
- def visit_for(self, node):
- """dummy method for visiting an For node"""
-
- def visit_from(self, node):
- """dummy method for visiting an From node"""
-
- def visit_function(self, node):
- """dummy method for visiting an Function node"""
-
- def visit_genexpr(self, node):
- """dummy method for visiting an ListComp node"""
-
- def visit_getattr(self, node):
- """dummy method for visiting an Getattr node"""
-
- def visit_global(self, node):
- """dummy method for visiting an Global node"""
-
- def visit_if(self, node):
- """dummy method for visiting an If node"""
-
- def visit_ifexp(self, node):
- """dummy method for visiting an IfExp node"""
-
- def visit_import(self, node):
- """dummy method for visiting an Import node"""
-
- def visit_index(self, node):
- """dummy method for visiting an Index node"""
-
- def visit_keyword(self, node):
- """dummy method for visiting an Keyword node"""
-
- def visit_lambda(self, node):
- """dummy method for visiting an Lambda node"""
-
- def visit_list(self, node):
- """dummy method for visiting an List node"""
-
- def visit_listcomp(self, node):
- """dummy method for visiting an ListComp node"""
-
- def visit_module(self, node):
- """dummy method for visiting an Module node"""
-
- def visit_name(self, node):
- """dummy method for visiting an Name node"""
-
- def visit_pass(self, node):
- """dummy method for visiting an Pass node"""
-
- def visit_print(self, node):
- """dummy method for visiting an Print node"""
-
- def visit_raise(self, node):
- """dummy method for visiting an Raise node"""
-
- def visit_return(self, node):
- """dummy method for visiting an Return node"""
-
- def visit_setcomp(self, node):
- """dummy method for visiting an SetComp node"""
-
- def visit_slice(self, node):
- """dummy method for visiting an Slice node"""
-
- def visit_subscript(self, node):
- """dummy method for visiting an Subscript node"""
-
- def visit_tryexcept(self, node):
- """dummy method for visiting an TryExcept node"""
-
- def visit_tryfinally(self, node):
- """dummy method for visiting an TryFinally node"""
-
- def visit_tuple(self, node):
- """dummy method for visiting an Tuple node"""
-
- def visit_unaryop(self, node):
- """dummy method for visiting an UnaryOp node"""
-
- def visit_while(self, node):
- """dummy method for visiting an While node"""
-
- def visit_with(self, node):
- """dummy method for visiting an With node"""
-
- def visit_yield(self, node):
- """dummy method for visiting an Yield node"""
-
class ASTWalker:
"""a walker visiting a tree in preorder, calling on the handler:
@@ -438,5 +249,5 @@ class TreeTester(object):
return mod.repr_tree(ids)
-__all__ = ('LocalsVisitor', 'ASTWalker', 'ASTVisitor',)
+__all__ = ('LocalsVisitor', 'ASTWalker',)