From 1b279dcf94df83d7443c595d81118b5ba81124bc Mon Sep 17 00:00:00 2001 From: Colby McHenry Date: Tue, 7 Apr 2026 13:03:47 -0500 Subject: [PATCH] fix: Handle JavaScript class inheritance parsing differences from TypeScript MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Addresses JavaScript `class extends` producing zero inheritance edges due to tree-sitter grammar differences. JavaScript uses `class_heritage → identifier` (bare) while TypeScript wraps with `extends_clause`. Updates extractInheritance to handle bare identifier/type_identifier children when parent is class_heritage. --- docs/SEARCH_QUALITY_LOOP.md | 1 + src/extraction/tree-sitter.ts | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/SEARCH_QUALITY_LOOP.md b/docs/SEARCH_QUALITY_LOOP.md index 784b765..c04bbeb 100644 --- a/docs/SEARCH_QUALITY_LOOP.md +++ b/docs/SEARCH_QUALITY_LOOP.md @@ -459,6 +459,7 @@ test().catch(console.error); | Svelte template function calls invisible (e.g. `class={cn(...)}`) | SvelteExtractor only parsed `