Skip to content

Conversation

@tnm
Copy link
Contributor

@tnm tnm commented Dec 26, 2025

Summary

  • Fix extract_symbols MCP tool to detect JavaScript/TypeScript arrow functions
  • The tree-sitter query files were missing patterns for lexical_declaration (used by const/let)

Changes

  • Update javascript/tags.scm to detect arrow functions, function expressions, exports
  • Update typescript/tags.scm to detect non-exported arrow functions
  • Add 16 new tests for arrow function detection
  • Update golden test expectations

Fixes #168

The tree-sitter query files were missing patterns to match arrow functions.
The key issue was that const/let use lexical_declaration (not variable_declaration).

- Update JavaScript tags.scm to detect arrow functions, function expressions
- Update TypeScript tags.scm to detect non-exported arrow functions
- Add comprehensive test coverage for arrow function detection
- Update golden test expectations

Fixes #168
@tnm tnm merged commit 3386b2e into main Dec 27, 2025
2 checks passed
tnm added a commit that referenced this pull request Dec 27, 2025
- Update __version__ in src/kit/__init__.py from 3.1.0 to 3.2.0
- Add changelog entry for arrow function detection fix (#168, #169)
tnm added a commit that referenced this pull request Dec 27, 2025
- Update __version__ in src/kit/__init__.py from 3.1.0 to 3.2.0
- Add changelog entry for arrow function detection fix (#168, #169)
tnm added a commit that referenced this pull request Dec 27, 2025
- Update __version__ in src/kit/__init__.py from 3.1.0 to 3.2.0
- Add changelog entry for arrow function detection fix (#168, #169)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extract_symbolsmcp tool does not detect JavaScript arrow functions

2 participants