KTree Sitter
Kotlin bindings to the tree-sitter parsing library.
Supported platforms
☑ JVM
☑ Android
☑ Native
☐ WASI
JS and WasmJS will not be supported.
Installation
dependencies {
implementation("io.github.tree-sitter:ktreesitter") version "0.24.0"
}
repositories {
mavenCentral()
}
Content copied to clipboard
Basic usage
val language = Language(TreeSitterKotlin.language())
val parser = Parser(language)
val tree = parser.parse("fun main() {}")
val rootNode = tree.rootNode
assert(rootNode.type == "source_file")
assert(rootNode.startPoint.column == 0)
assert(rootNode.endPoint.column == 13)
Content copied to clipboard
Kotlin bindings to the tree-sitter parsing library.
Supported platforms
☑ JVM
☑ Android
☑ Native
☐ WASI
JS and WasmJS will not be supported.
Installation
dependencies {
implementation("io.github.tree-sitter:ktreesitter") version "0.24.0"
}
repositories {
mavenCentral()
}
Content copied to clipboard
Basic usage
val language = Language(TreeSitterKotlin.language())
val parser = Parser(language)
val tree = parser.parse("fun main() {}")
val rootNode = tree.rootNode
assert(rootNode.type == "source_file")
assert(rootNode.startPoint.column == 0)
assert(rootNode.endPoint.column == 13)
Content copied to clipboard
Kotlin bindings to the tree-sitter parsing library.
Supported platforms
☑ JVM
☑ Android
☑ Native
☐ WASI
JS and WasmJS will not be supported.
Installation
dependencies {
implementation("io.github.tree-sitter:ktreesitter") version "0.24.0"
}
repositories {
mavenCentral()
}
Content copied to clipboard
Basic usage
val language = Language(TreeSitterKotlin.language())
val parser = Parser(language)
val tree = parser.parse("fun main() {}")
val rootNode = tree.rootNode
assert(rootNode.type == "source_file")
assert(rootNode.startPoint.column == 0)
assert(rootNode.endPoint.column == 13)
Content copied to clipboard
Kotlin bindings to the tree-sitter parsing library.
Supported platforms
☑ JVM
☑ Android
☑ Native
☐ WASI
JS and WasmJS will not be supported.
Installation
dependencies {
implementation("io.github.tree-sitter:ktreesitter") version "0.24.0"
}
repositories {
mavenCentral()
}
Content copied to clipboard
Basic usage
val language = Language(TreeSitterKotlin.language())
val parser = Parser(language)
val tree = parser.parse("fun main() {}")
val rootNode = tree.rootNode
assert(rootNode.type == "source_file")
assert(rootNode.startPoint.column == 0)
assert(rootNode.endPoint.column == 13)
Content copied to clipboard