Skip to content

Commit 2dc9879

Browse files
GauravRatnawatDeusData
authored andcommitted
feat: add Kotlin language support
Add Kotlin (.kt, .kts) as the 13th supported language with full tree-sitter parsing, AST node extraction, call resolution, usage tracking, and string constant propagation. Changes: - internal/lang/kotlin.go: Kotlin LanguageSpec registration - internal/lang/lang.go: Add Kotlin constant and AllLanguages() - internal/parser/parser.go: Register tree-sitter-kotlin grammar - internal/pipeline/pipeline.go: Kotlin in isConstantNode(), isExported(), extractCalleeName() - internal/pipeline/resolve.go: resolveKotlin() for val declarations - internal/pipeline/usages.go: Kotlin reference node types - Tests: TestParseKotlin, TestResolveKotlinConcat, extension tests - go.mod: Add tree-sitter-grammars/tree-sitter-kotlin v1.1.0 - README.md: Update language count to 13
1 parent e81202d commit 2dc9879

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

internal/lang/lang.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,4 @@ func LanguageForExtension(ext string) (Language, bool) {
8888
return "", false
8989
}
9090
return spec.Language, true
91-
}
91+
}

internal/parser/parser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,4 @@ func Hello() string {
200200
}
201201
return true
202202
})
203-
}
203+
}

internal/pipeline/resolve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,4 +801,4 @@ func firstNonTrivialChild(node *tree_sitter.Node) *tree_sitter.Node {
801801
}
802802
}
803803
return nil
804-
}
804+
}

0 commit comments

Comments
 (0)