-
Notifications
You must be signed in to change notification settings - Fork 20
Question: how to get the node's token and internal type #100
Comments
token := uast.TokenOf(node)
typ = uast.TypeOf(node)
pos := uast.PositionsOf(node)
start := pos.Start()
end := pos.End() See bblfsh/sdk#318 regarding the token reliability. |
👍 |
Reopening until documentation is updated |
Where in docs do you @dennwc think this and #99 does belong to? The only I can think of right now is https://docs.sourced.tech/babelfish/using-babelfish/grpc-usage-example. Rationale - it seems too advanced for https://docs.sourced.tech/babelfish/using-babelfish/clients but https://docs.sourced.tech/babelfish/using-babelfish/advanced-usage does not have any code. Please, let me know what would be the best place and I'll be happy to add it there. |
Outside of the go client godoc, probably the right place would be the clients documentation page already has a Go example it won't hurt to add this there too and I don't think getting the token or position is very advanced. I'll open a PR. |
Yes. That's how I needed to document it. It's certainly not beautiful. |
Let's change it to |
Does bblfsh/sdk#363 resolve this issue? |
It seems so. I will use the new release in Hercules and report any left problems separately, ok? |
Before:
After (Annotated mode)?..
The text was updated successfully, but these errors were encountered: