Skip to content

Commit

Permalink
Add line field to collection and string nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
aravij committed Jul 20, 2020
1 parent c5aa6a8 commit 58de06e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aibolit/ast_framework/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def _add_javalang_standard_node(tree: DiGraph, javalang_node: Node) -> Tuple[int
@staticmethod
def _add_javalang_collection_node(tree: DiGraph, collection_node: Set[Any]) -> int:
node_index = len(tree) + 1
tree.add_node(node_index, node_type=ASTNodeType.COLLECTION)
tree.add_node(node_index, node_type=ASTNodeType.COLLECTION, line=None)
# we expect only strings in collection
# we add them here as children
for item in collection_node:
Expand All @@ -283,7 +283,7 @@ def _add_javalang_collection_node(tree: DiGraph, collection_node: Set[Any]) -> i
@staticmethod
def _add_javalang_string_node(tree: DiGraph, string_node: str) -> int:
node_index = len(tree) + 1
tree.add_node(node_index, node_type=ASTNodeType.STRING, string=string_node)
tree.add_node(node_index, node_type=ASTNodeType.STRING, string=string_node, line=None)
return node_index

@staticmethod
Expand Down

0 comments on commit 58de06e

Please sign in to comment.