Serialised AST for one top-level syntactic block.
| 44 | |
| 45 | @dataclass(frozen=True) |
| 46 | class AstChunk: |
| 47 | """Serialised AST for one top-level syntactic block.""" |
| 48 | chunk_id: str # "FunctionDef:my_func", "ClassDef:MyClass", "stmt:42" |
| 49 | start_line: int # 1-based, matches ast.lineno |
| 50 | end_line: int |
| 51 | content_hash: str # sha256 of this chunk's source text |
| 52 | ast_json_z: bytes # zlib-compressed JSON of the AstNode subtree |
| 53 | |
| 54 | |
| 55 | @dataclass(frozen=True) |
no outgoing calls