tree-sitter / kotlin-tree-sitter

Kotlin bindings to the Tree-sitter parsing library
https://tree-sitter.github.io/kotlin-tree-sitter/
MIT License
13 stars 1 forks source link

Basic usage not work #32

Open ygj0930 opened 1 week ago

ygj0930 commented 1 week ago

val language = Language(TreeSitterKotlin.language()) val parser = Parser(language) val tree = parser.parse("fun main() {}") val rootNode = tree.rootNode

But TreeSitterKotlin.language() not exist?

ObserverOfTime commented 1 week ago

Parser bindings are not yet available. Check https://github.com/fwcd/tree-sitter-kotlin/pull/126/commits/135386ba7ee86620545d4216cfa4f0682fe764df. You can add the parser repo you want as a submodule and point the grammarDir to it.