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

Support Kotlin native #3

Open
oxisto opened this issue Dec 11, 2021 · 4 comments
Open

Support Kotlin native #3

oxisto opened this issue Dec 11, 2021 · 4 comments

Comments

@oxisto
Copy link
Owner

oxisto commented Dec 11, 2021

The project is already set-up as a multi module so it should be easy to have another module for Kotlin native and use the tree-sitter C API directly instead of JNA. Possibly, we need to extract some common interfaces between both.

@orchestr7
Copy link

orchestr7 commented Mar 22, 2023

Btw - do you have any plans to move CPG to Kotlin Native? If yes, it would be awesome - when you will start accepting PRs, I would be glad to help, because it can solve a bunch of problems related to C++ parsing.

And also - what are the plans for CPG to migrate to tree-sitter frontends? Do you plan it?

@oxisto
Copy link
Owner Author

oxisto commented Mar 22, 2023

Btw - do you have any plans to move CPG to Kotlin Native? If yes, it would be awesome - when you will start accepting PRs, I would be glad to help, because it can solve a bunch of problems related to C++ parsing.

That was/is one of the visionary goals I had in mind once maybe Kotlin native is also is more mature. Removing CDT is one of the big chunks standing in the way. A lot (almost all) of the Java Codebase is already converted to Kotlin. We are still using a lot of Java libraries though.

And also - what are the plans for CPG to migrate to tree-sitter frontends? Do you plan it?

We originally planned it for the C/C++ frontend but this is currently on hold as it turns out it is more complicated than we originally thought and we are lacking the resources to do it.

@djpixles
Copy link

import (
"context"
"fmt"

sitter "github.com/smacker/go-tree-sitter"
"github.com/smacker/go-tree-sitter/javascript"

)

parser := sitter.NewParser()
parser.SetLanguage(javascript.GetLanguage())

@djpixles
Copy link

Go

@djpixles djpixles mentioned this issue May 19, 2024
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