| 13 | |
| 14 | @dataclass |
| 15 | class ASTNodeIdentifier: |
| 16 | label: Union[str, None] = None |
| 17 | node_type: Union[str, None] = '' |
| 18 | children: List[Any] = field(default_factory=list) |
| 19 | |
| 20 | def __iadd__(self, other): |
| 21 | if other: |
| 22 | self.children.append(other) |
| 23 | return self |
| 24 | |
| 25 | def to_tuple(self): |
| 26 | return (self.label, self.node_type, tuple(x.to_tuple() for x in self.children)) |
| 27 | |
| 28 | |
| 29 | @Analyzer.ID("ast_ngrams") |
no outgoing calls
no test coverage detected