Fixed a critical functional bug where multiple subscripts with the same
parameter name (e.g., 'key') would create identifier collisions in the parsed
output, making them indistinguishable.
The fix changes the subscript capture pattern from capturing the parameter
name to capturing the entire subscript_declaration node with @name.definition.method
tags. This ensures each subscript is uniquely identified by its full signature
(e.g., "subscript(key: String) -> Value?") rather than just the parameter name.
Added comprehensive test cases:
- Swift protocol/class with multiple subscripts to validate the fix
- C# mixed inheritance (base class + multiple interfaces) for better coverage
All 869 tests pass with this change.
After updating @repomix/tree-sitter-wasms to 0.1.15, we reviewed all
language query files against their official tree-sitter tags.scm files.
This revealed that Swift queries were missing protocol method definitions
(protocol_function_declaration, subscript_declaration, init_declaration
within protocol_body).
This commit adds the missing patterns and comprehensive test coverage
for protocol methods to ensure Swift protocol definitions are properly
parsed and included in the output.