示例#1
0
 def visit_callfunc(self, node, parent):
     """visit a CallFunc node by returning a fresh instance of it"""
     newnode = new.CallFunc()
     self._set_infos(node, newnode, parent)
     newnode.func = self.visit(node.node, newnode)
     newnode.args = [self.visit(child, newnode) for child in node.args]
     if node.star_args:
         newnode.starargs = self.visit(node.star_args, newnode)
     if node.dstar_args:
         newnode.kwargs = self.visit(node.dstar_args, newnode)
     return newnode
示例#2
0
 def visit_callfunc(self, node, parent):
     """visit a CallFunc node by returning a fresh instance of it"""
     newnode = new.CallFunc()
     _lineno_parent(node, newnode, parent)
     newnode.func = self.visit(node.func, newnode)
     newnode.args = [self.visit(child, newnode) for child in node.args]
     newnode.starargs = self.visit(node.starargs, newnode)
     newnode.kwargs = self.visit(node.kwargs, newnode)
     newnode.args.extend(self.visit(child, newnode) for child in node.keywords)
     newnode.set_line_info(newnode.last_child())
     return newnode