Skip to content

Preserve unterminated string tokens #20849

@MichaReiser

Description

@MichaReiser

Unterminated strings are never emitted by the lexer which means that the parser can't recover from it. Possible solution would be move the handling of unterminated strings to the parser which could then emit a string node with Unterminated flag set on it. This is what Pyright does as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    parserRelated to the parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions