bblfsh / go-driver

GNU General Public License v3.0
10 stars 9 forks source link

"#" is included into comments #39

Closed vmarkovtsev closed 5 years ago

vmarkovtsev commented 5 years ago

This is related to https://github.com/bblfsh/go-driver/issues/13

My Go driver version is 2.5.0. The //*[role='Comment'] nodes have @token-s with "#" prepended. I expect them to be erased.

dennwc commented 5 years ago

If you use Annotated mode, they will be present, since it's a native AST with annotations. If you use it with Semantic all comments will be without those tokens.

dennwc commented 5 years ago

Also, it seems unrelated to the Go driver, probably should be in SDK or Go client.

vmarkovtsev commented 5 years ago

I see the point, but all comments in Annotated mode become useless for us this way.

Can you please move this issue to the relevant project.

vmarkovtsev commented 5 years ago

This behavior is also not consistent with identifiers in Annotated mode: their token values do not include double or single quotes.

dennwc commented 5 years ago

Is there any reason to use Annotated specifically?

The second comment is a bug. What is the language you are trying to parse?

vmarkovtsev commented 5 years ago

I see that Annotated v1 and Annotated v2 work differently, and the string literals (that's what I meant ofc) indeed include quotes in v2. No bug, sorry.