Skip to main content

REFERENCE_QUERY

Constant REFERENCE_QUERY 

Source
pub const REFERENCE_QUERY: &str = r#"
(type (identifier) @type_ref)
(generic_type (identifier) @type_ref)
"#;
Expand description

Tree-sitter query for extracting type references. Python grammar has no type_identifier node; use (type (identifier) @type_ref) to capture type names in annotations and generic_type for parameterized types.