(node, blob: str, nodes_to_exclude: Optional[Set]=None)
| 22 | |
| 23 | |
| 24 | def tokenize_code(node, blob: str, nodes_to_exclude: Optional[Set]=None) -> List: |
| 25 | tokens = [] |
| 26 | traverse(node, tokens) |
| 27 | # print(tokens) |
| 28 | # for token in tokens: |
| 29 | # print(token.text) |
| 30 | return [match_from_span(token, blob) for token in tokens if nodes_to_exclude is None or token not in nodes_to_exclude] |
| 31 | |
| 32 | def nodes_are_equal(n1, n2): |
| 33 | return n1.type == n2.type and n1.start_point == n2.start_point and n1.end_point == n2.end_point |
nothing calls this directly
no test coverage detected