Discovered in https://github.com/bblfsh/javascript-driver/pull/81#issuecomment-481845021 and as noted at https://github.com/bblfsh/javascript-driver/pull/81#issuecomment-481852636 - this driver does not handle _string literals_ in annotated mode the same way as other drivers do: it does not preserve the `"` and `'` as part of the literal value in annotated mode. On ```python bc = "b\nc" bcq = 'b\ncq' ``` ### Actual `//*[@role='String' and @role='Literal']` XPath query results in ``` "@token":"b\nc","@type":"Str" "@token":"b\ncq","@type":"Str" ``` ### Expected For annotated mode, `@token` values should be: ``` 'b\\ncq' \"b\\ncq\" ```
Discovered in bblfsh/javascript-driver#81 (comment) and as noted at bblfsh/javascript-driver#81 (comment) - this driver does not handle string literals in annotated mode the same way as other drivers do: it does not preserve the
"and'as part of the literal value in annotated mode.On
Actual
//*[@role='String' and @role='Literal']XPath query results inExpected
For annotated mode,
@tokenvalues should be: