gumtree icon indicating copy to clipboard operation
gumtree copied to clipboard

Wrong position info of tree node

Open SherloqueChang opened this issue 3 years ago • 5 comments

Hi! I'm using GumTree on Ubuntu.

When I obtained the whole tree structure of the program in xml format, I found there was something wrong with the starting position of certain tree node. For example:

<tree type="Definition" pos="242689" length="9158">

But in fact, pos of the "Definition" should be 242569.

I couldn't figure out why this went wrong.

SherloqueChang avatar Apr 22 '22 15:04 SherloqueChang

Hi!

With which parser?

Cheers.

jrfaller avatar Apr 22 '22 15:04 jrfaller

cgum

SherloqueChang avatar Apr 22 '22 15:04 SherloqueChang

Sorry it's highly possible. Cgum is not really maintained at the moment. Maybe you could try with tree-sitter C parser?

Cheers.

jrfaller avatar Apr 22 '22 15:04 jrfaller

Ah, I'm invoking GumTree Java API in a maven project. As far as I'm concerned, tree-sitter C parser doesn't provide maven dependency. Is that so?

SherloqueChang avatar Apr 22 '22 15:04 SherloqueChang

You're right, it's not released yet on Maven central.

Cheers.

jrfaller avatar May 18 '22 15:05 jrfaller