def default(self, node, *args, **kwargs): if node.__class__ in SirToPyVisitor.arg_irnodes: return self.visit_arg_irnode(node, **kwargs) elif node.__class__ in SirToPyVisitor.simple_nodes: return self.visit_irnode(node, **kwargs) else: return ASTVisitor.default(self, node, *args, **kwargs)
def default(self, node, *args, **kwargs): if hasattr(node, 'parent'): #self.log("node already has parent: (%s)%s" % ( # str(node.parent.lineno) if hasattr(node.parent, 'lineno') else '?', # ast.dump(node.parent) #)) return self.default_accumulator() return ASTVisitor.default(self, node, *args, **kwargs)