stacklit
stacklit copied to clipboard
Add Kotlin and Dart tree-sitter support
Stacklit currently parses 11 languages. Kotlin and Dart are the two most requested additions.
What needs to happen for each language:
- Add the tree-sitter grammar dependency
- Write queries for extracting exports (functions, classes, types)
- Write queries for extracting imports
- Add test fixtures with a small sample project
- Update the language list in README
The existing language implementations in the parser package are good references. Each language is roughly 50-100 lines of query definitions.
Good first contribution if you know either language.
Fixed in #38. Dart is added, and the Kotlin extractor is fixed (objects, properties, enum entries and full function signatures). #41 adds symbol and call edges for both. Known gap: Kotlin interface declarations after a class can still produce a partial parse.