Files
Kazuki Yamada 0fd8812b01 refactor(treeSitter): Abstract language-specific parsing logic and unify language configuration
Created BaseParseStrategy abstract class to reduce code duplication:
- Common helper methods (getCaptureTypes, checkAndAddToProcessed, validateLineExists)
- Shared ParseResult type and CommonCaptureTypes constants
- All strategies (Default, TypeScript, Python, Go, CSS, Vue) now extend base class

Unified language configuration in languageConfig.ts:
- Consolidated ext2Lang.ts and lang2Query.ts functionality
- Single source of truth for language settings (extensions, queries, strategies)
- Efficient Map-based lookup system for better performance
- Removed switch statement in createParseStrategy()

Updated all Strategy classes to extend BaseParseStrategy:
- Eliminated ~200 lines of duplicate code
- Improved maintainability and extensibility
- Easier to add new languages (single configuration change)

This refactoring was motivated by the need to reduce code duplication across
language-specific strategies and simplify the process of adding new language
support. The previous implementation had language configurations scattered
across multiple files, making it difficult to maintain and extend.
2025-11-24 23:09:22 +09:00
..