Commit a41594b4 authored by Stefan Behnel's avatar Stefan Behnel

cdef another class in ParseTreeTransforms

parent 138e5cbc
from Cython.Compiler.Visitor cimport (
CythonTransform, VisitorTransform,
CythonTransform, VisitorTransform, TreeVisitor,
ScopeTrackingTransform, EnvTransform)
#class NameNodeCollector(TreeVisitor):
# cdef list name_nodes
cdef class NameNodeCollector(TreeVisitor):
cdef list name_nodes
cdef class SkipDeclarations: # (object):
pass
......
......@@ -26,11 +26,12 @@ class NameNodeCollector(TreeVisitor):
super(NameNodeCollector, self).__init__()
self.name_nodes = []
visit_Node = TreeVisitor.visitchildren
def visit_NameNode(self, node):
self.name_nodes.append(node)
def visit_Node(self, node):
self._visitchildren(node, None)
class SkipDeclarations(object):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment