Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

annotated: quotes are not preserved #195

@bzz

Description

@bzz

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

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\"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions