documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Define ending position column

Open smacker opened this issue 8 years ago • 4 comments

There is an inconsistency in java&python drivers. EndPosition.End.Col for java driver returns the position of next character and python driver returns the position of the last character. For example for code print node will have EndPosition.End.Col = 6 for java and EndPosition.End.Col = 5 for python. Currently, it isn't defined what driver should return, so it depends on native AST. Position should be defined and later fixed in drivers accordingly.

smacker avatar Jan 09 '18 15:01 smacker

\cc @dennwc @juanjux what do you guys think?

bzz avatar Jun 26 '18 12:06 bzz

It should be fixed as a part of v2 release. We are almost there.

dennwc avatar Jun 26 '18 12:06 dennwc

We are experiencing this with Golang driver as well in gitbase-playground.

🤞 Waiting for v2 😄

bzz avatar Jun 26 '18 13:06 bzz

Aware of problems with Go drivers, and it's fixed upstream as well :) Tested with https://github.com/bblfsh/uast-viewer/pull/19

dennwc avatar Jun 26 '18 13:06 dennwc