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

annotated: quotes are not preserved #44

Open
bzz opened this issue Apr 14, 2019 · 0 comments
Open

annotated: quotes are not preserved #44

bzz opened this issue Apr 14, 2019 · 0 comments
Labels

Comments

@bzz
Copy link
Contributor

bzz commented Apr 14, 2019

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\"
@bzz bzz added the bug label Apr 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant