vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

syntax: escaped backticks not handled in identifier

Open kevinushey opened this issue 3 years ago • 3 comments

For example, the following is a valid identifier:

`\``

But the escaped backtick is treated as the end of the identifier, and so the final backtick is its own separate thing.

Screen Shot 2022-08-25 at 8 34 03 PM

https://github.com/REditorSupport/vscode-R/blob/da579cc17a9485f7a11bf5e75bf6b9c347eca116/syntax/r.json#L169-L172

I think a regular expression like the following would suffice:

([`](?:(?:\\\\.)|(?:[^`\\\\]))*[`])

Alternatively, I think the existing strategy for matching strings could be re-used for quoted identifiers.

https://github.com/REditorSupport/vscode-R/blob/da579cc17a9485f7a11bf5e75bf6b9c347eca116/syntax/r.json#L315-L335

kevinushey avatar Aug 26 '22 03:08 kevinushey

This issue is stale because it has been open for 365 days with no activity.

github-actions[bot] avatar Aug 27 '23 01:08 github-actions[bot]

unstale

eitsupi avatar Aug 27 '23 01:08 eitsupi