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 #44

@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

<?php

"b\nc";
'b\ncq';

Actual

//*[@role='String' and @role='Literal'] XPath query results in

"@token":"b\nc","@type":"Scalar_String","attributes":{"kind":2}
"@token":"b\\ncq","@type":"Scalar_String","attributes":{"kind":1}

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