Conversation
abhisek
commented
Aug 6, 2025
- feat: Add support for function resolvers
- feat: Add support for function resolvers
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
==========================================
+ Coverage 56.84% 57.88% +1.04%
==========================================
Files 46 47 +1
Lines 3661 4578 +917
==========================================
+ Hits 2081 2650 +569
- Misses 1421 1705 +284
- Partials 159 223 +64 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive function resolver support to the codebase, enabling the parsing and extraction of function declarations from multiple programming languages including Python, JavaScript, Java, and Go. The implementation introduces a unified FunctionDeclarationNode AST representation and language-specific resolvers that leverage Tree-Sitter queries to extract function metadata.
Key changes:
- Adds
ResolveFunctionsmethod to theLanguageResolversinterface - Implements function resolvers for Python, JavaScript, Java, and Go languages
- Creates comprehensive test fixtures and test cases for each language
- Introduces enhanced AST node structure with position tracking capabilities
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
core/language.go |
Adds ResolveFunctions method to LanguageResolvers interface |
core/ast/function_decl.go |
Comprehensive FunctionDeclarationNode implementation with metadata support |
core/ast/node.go |
Adds node position tracking utilities |
lang/python_resolvers.go |
Python-specific function resolver implementation with Tree-Sitter queries |
lang/javascript_resolvers.go |
JavaScript function resolver supporting various function types |
lang/java_resolvers.go |
Java function resolver with access modifier and annotation support |
lang/go_resolvers.go |
Go function resolver with method and receiver type extraction |
| Test files | Comprehensive test suites for all language resolvers |
| Fixture files | Test data for Python, JavaScript, Java, and Go function parsing |
docs/grammar.md |
Documentation linking to Tree-Sitter grammar references |
Comments suppressed due to low confidence (3)
lang/go_resolvers_test.go:94
- The variable name 'l' is ambiguous and not used. Consider removing this line or renaming the variable to be more descriptive like 'goLanguage' to match the pattern used elsewhere in the test.
l, err := lang.NewGoLanguage()