Skip to main content

Module structural

Module structural 

Source
Expand description

Python structural spec: maps tree-sitter-python node types onto the normalized kind vocabulary and extracts role edges from AST fields. See src/analyzer/structural/spec.rs for the contract and .agent/ISSUE_328_SEARCH_AST_EXECPLAN.md for the design.

Structs§

PythonComparisonShape
PythonStructuralSpec

Constants§

PYTHON_KIND_TABLE
Grammar node-type → normalized kind. Every name here must exist in the tree-sitter-python grammar; tests::python_kind_table_matches_grammar asserts that, so a grammar bump that renames a node fails loudly.

Statics§

PYTHON_STRUCTURAL_SPEC

Functions§

callee_spine_step
Grammar steps for the shared call-callee spine. A value expression has no step.
python_comparison_shape
Read comparison operands and operator tokens from the grammar node. Python comparison operators are repeated fields; named operator aliases such as is not are distinguished from operands by their field name.