Skip to content

Commit

Permalink
Make line common attribute to all nodes
Browse files Browse the repository at this point in the history
with possible value None.
  • Loading branch information
aravij committed Jul 13, 2020
1 parent fa2d917 commit cce899c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions aibolit/ast_framework/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ def _add_javalang_standard_node(tree: DiGraph, javalang_node: Node) -> Tuple[int
attributes = {attr_name: getattr(javalang_node, attr_name) for attr_name in attr_names}

attributes['type'] = node_type
if javalang_node.position is not None:
attributes['line'] = javalang_node.position.line
attributes['line'] = javalang_node.position.line if javalang_node.position is not None else None

tree.add_node(node_index, **attributes)
return node_index, node_type
Expand Down

0 comments on commit cce899c

Please sign in to comment.