Skip to content

syntax: escaped backticks not handled in identifier #22

Description

@kevinushey

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions