GumTreeDiff/gumtree

add support for Go

Closed this issue · 4 comments

Hi,

AFAIU, right now gumtree does not support Go.

Given that there exists a grammar in tree-sitter for Go (https://github.com/tree-sitter/tree-sitter-go), do you think it would be feasible to add it here?

Hi!

This is a good idea I do not see why not!

Do you want to try and make the PR?

Cheers.

@jrfaller @andre15silva Hi~ Does it work well for go now? Do I need to install tree-sitter-go if I want to compare two go files?

image
Exception in thread "main" java.lang.UnsupportedOperationException: No generator found for file: client-origin.go
at com.github.gumtreediff.gen.TreeGenerators.getTree(TreeGenerators.java:54)
at Main.main(Main.java:22)

Hi @xavier-hou! It should be working, however, the grammar will need extensive cleaning for being diff friendly. You need to install our tree-sitter-parser project, and get the latest version of GumTree. Cheers!

@jrfaller Thank you for your reply~