kotlintree icon indicating copy to clipboard operation
kotlintree copied to clipboard

Support Kotlin native

Open oxisto opened this issue 3 years ago • 4 comments

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.

oxisto avatar Dec 11 '21 12:12 oxisto

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?

orchestr7 avatar Mar 22 '23 12:03 orchestr7

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.

oxisto avatar Mar 22 '23 14:03 oxisto

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 avatar May 19 '24 04:05 djpixles

Go

djpixles avatar May 19 '24 04:05 djpixles