def visit_Constant(self, node):
     if not hasattr(node, 'isdoc'):
         value = value_of(node)
         return ast.Name(id=self.env.constants[value].name)
     else:
         return node
Exemple #2
0
 def visit_Constant(self, node):
     if not hasattr(node, 'isdoc'):
         value = value_of(node)
         return self.add_constant(node, value)
Exemple #3
0
 def visit_Constant(self, node):
     if not hasattr(node, 'isdoc'):
         value = value_of(node)
         return self.add_constant(node, value)
 def add_assignment(self, left_name, right_node):
     val = value_of(right_node)
     self.aliases[val] = left_name
     self.assignments[left_name] = right_node
 def add_assignment(self, left_name, right_node):
     val = value_of(right_node)
     self.aliases[val] = left_name
     self.assignments[left_name] = right_node
Exemple #6
0
 def visit_Constant(self, node):
     if not hasattr(node, 'isdoc'):
         value = value_of(node)
         return ast.Name(id=self.env.constants[value].name)
     else:
         return node