Skip to content

[BUG] False positive "lone slash in escape sequence" with \\" in triple-quoted strings #422

@MrAMS

Description

@MrAMS

Description:

The LSP incorrectly parses \\" inside triple-quoted strings. It treats \\ as an escaped backslash and then interprets the following " as a string terminator, causing false errors.

Minimal reproduction:

_TEMPLATE = """
echo 'print("#include \\"" + f + "\\"")'
"""

Errors reported:

  • lone slash in escape sequence
  • String literal is not terminated

Expected: No errors. The \\" should produce a literal \" in the output, not terminate the string.

Related issue zed-starlark/issues/17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions