Expand description
Per-category node-kind classification rules.
Each sub-module declares the tree-sitter node kinds that map to a built-in pattern category. Two classifiers are provided:
category_for_node_kind— node-kind-only, fast, does not inspect source text.classify_hint— node-kind + callee-text, uses per-language regex tables. Prefer this for foreign extractors that have fullPatternHintInputaccess.
Category names are stable from Milestone 6 forward. Renaming any name is a
breaking change requiring a MIGRATION_NOTES.md entry.
Modules§
- async_
patterns - Node-kind and callee-text classification for async-concurrency patterns.
- class_
hierarchy - Node kinds classified as class-hierarchy patterns.
- collection_
pipelines - Callee-text classification for functional collection-transform method calls.
- comprehensions
- Node kinds classified as comprehension usage.
- concurrency
- Node-kind and callee-text classification for concurrency patterns.
- data_
access - Node kinds classified as data-access patterns.
- decorators
- Node kinds classified as decorator usage.
- error_
handling - Node kinds classified as error-handling patterns.
- framework_
hooks - Node kinds classified as framework-hook calls.
- http_
routing - Callee-text classification for server-side HTTP route/endpoint declarations.
- logging
- Node kinds that conceptually belong to the
loggingcategory. - null_
safety - Node kinds classified as null-safety usage.
- resource_
management - Node kinds classified as resource-management patterns.
- schema_
validation - Callee-text classification for runtime schema / validation declarations.
- serialization
- Callee-text classification for serialization boundary calls.
- state_
management - Node kinds classified as state-management patterns.
- state_
store - Callee-text classification for external state-management library declarations.
- testing
- Callee-text classification for test-suite structure and assertion patterns.
- type_
assertions - Node kinds classified as type-assertion/cast patterns.
Constants§
- ALL_
CATEGORIES - All built-in category names in stable alphabetical order.
Functions§
- category_
for_ node_ kind - Maps a tree-sitter
node_kindto the built-in category it belongs to. - classify_
hint - Classify a
PatternHintInputusing both node kind and callee-text inspection.