Skip to content

Commit

Permalink
Add representation for ASTNode.
Browse files Browse the repository at this point in the history
  • Loading branch information
aravij committed Jul 13, 2020
1 parent 2c2bbc7 commit 95dedb4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aibolit/ast_framework/ast_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ def __str__(self) -> str:
text_representation += f'\n{attribute_name}: {self.__getattr__(attribute_name)}'

return text_representation

def __repr__(self) -> str:
return f'<ASTNode node_type: {self.__getattr__("type")}, node_index: {self._node_index}>'

0 comments on commit 95dedb4

Please sign in to comment.