Example #1
0
 def copy(self):
   n2 = FunctionNode(self.name, self.lineno)
   self.copy_basic(n2)
   self.copy_children(n2)
   
   n2.members = odict()
   n2.functions = odict()
   n2.class_type = self.class_type
   n2.is_generator = self.is_generator
   n2.class_parent = self.class_parent
   n2.path = self.path
   n2.ret = self.ret
   n2.is_native = self.is_native
   n2.is_anonymous = self.is_anonymous
   
   return n2
Example #2
0
 def __init__(self, name, lineno=0):
   super(FunctionNode, self).__init__()
   self.name = name
   self.origname = name
   self.is_anonymous = False
   
   self.is_native = False
   self.members = odict()
   self.functions = odict() #this is local nested functions, not class members
   self.ret = None
   self.class_type = "func" #valid values: ["func", "method", "class", "array"]
   self.type = None
   self.is_generator = False
   self.args = odict()
   self.arg_is = odict()
   self.path = None
   self.class_parent = None
   self.child_classes = odict()
   self.is_builtin = False
   self.logrecs = []
   self.template = None
   
   self.lrec_args = odict()
   
   if type(lineno) != int:
     self.lineno = lineno(1)
   else:
     self.lineno = lineno