kotlintree
kotlintree copied to clipboard
Support Kotlin native
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.
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?
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.
import ( "context" "fmt"
sitter "github.com/smacker/go-tree-sitter"
"github.com/smacker/go-tree-sitter/javascript"
)
parser := sitter.NewParser() parser.SetLanguage(javascript.GetLanguage())
Go