orchestrata_tools.parser
Reference › orchestrata_tools › parser
AST parsing and indexing utilities.
The parser package gets code structure into the orchestrata_tools models and makes it quick to search. There are two ways in and one lookup layer.
- json_loader loads the JSON snapshot written by the serializer built on orchestrata_ast.
- source_parser parses Python files directly with the standard
astmodule, so no snapshot is needed. - indexer builds the
ASTIndexof dictionaries that analyzers, generators and reviewers query.
Flow: either loader returns an ASTCodebase, and ASTIndex is built from it. The package __init__ re-exports the three classes. Start with indexer.
4 modules, 787 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
AST parsing and indexing utilities. | 7 |
indexer |
Build fast lookup indexes from ASTCodebase. | 192 |
json_loader |
Load ASTCodebase from serialize_codebase_ast JSON output. | 154 |
source_parser |
Parse Python source files directly into ASTCodebase models. | 434 |