-
Notifications
You must be signed in to change notification settings - Fork 13
Operator Role missing position information #65
Comments
Removing the assignment as it's used to communicated that something "has been take" and is kind-of-WIP but I'm not looking into this yet until the initial scope of https://github.com/bblfsh/javascript-driver/milestone/1 is finished. Will get back to this ASAP right after though. |
Indeed, some drivers do not have position at the operator node of the binary expression in annotated UAST: js, java. Others do: cpp. In some language native ASTs, there is no position information for a node representing such operation e.g In others, like Thus I'll suggest to treat this issue like a bug in js driver (native AST has position, UAST does not). But we also would need to have a broader discussion \w @creachadair and @dennwc on user expectations and a way of dealing with the same question e.g for a java-driver and alike, where native AST does not have this position, => UAST does not as well. |
Correct, I think it's "won't fix" for now. We need to change the tokenizer for this to work. |
Ok, it is not critical, we have a workaround. |
Run:
You get next UAST: https://gist.github.com/zurk/b594c7642a1bdfeca334ab27a2394426
And operator tokens are missing their positions:
And for driver v.1.2.0 I do not see this node. So I think it was added inside bblfsh, but without position information. It should be easy to include positions because you have positions for the right and left part of the expression.
The text was updated successfully, but these errors were encountered: