Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic usage not work #32

Open
ygj0930 opened this issue Nov 14, 2024 · 3 comments
Open

Basic usage not work #32

ygj0930 opened this issue Nov 14, 2024 · 3 comments

Comments

@ygj0930
Copy link

ygj0930 commented Nov 14, 2024

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
Copy link
Member

Parser bindings are not yet available. Check fwcd/tree-sitter-kotlin@135386b.
You can add the parser repo you want as a submodule and point the grammarDir to it.

@sdfgsdfgd
Copy link

sdfgsdfgd commented Jan 2, 2025

that means your library doesn't work then, why call it a tree sitter kotlin lib ?

tree sitter by default, on python, is bound to multiple language grammars and parsers which are statically linked as you enable them via a simple call

edit: if you're worried about the size this could simply be a secondary module outside -core, call that the current code. This should be very easy and straightforward .... All kotlin ast parser libs are in stone age.

@ObserverOfTime
Copy link
Member

tree sitter by default, on python, is bound to multiple language grammars and parsers which are statically linked as you enable them via a simple call

No, it is not. If you're talking about tree-sitter-languages, that is unofficial and outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants