Improve node.__str__ (fix #509)

pull/510/head
Josselin 5 years ago
parent 0d08823c77
commit b4a5df2388
  1. 7
      slither/core/cfg/node.py

@ -914,7 +914,12 @@ class Node(SourceMapping, ChildFunction):
###################################################################################
def __str__(self):
txt = NodeType.str(self._node_type) + ' ' + str(self.expression)
additional_info = ''
if self.expression:
additional_info += ' ' + str(self.expression)
elif self.variable_declaration:
additional_info += ' ' + str(self.variable_declaration)
txt = NodeType.str(self._node_type) + additional_info
return txt
# endregion

Loading…
Cancel
Save