Skip to content

Improve diagnostic for an if expression missing a semicolon #184

Description

@timfennis

Problem

An expression such as if x == y { true } else { false } can be followed by syntax that is interpreted as indexing the if expression, producing a generic parser error. The parser notes this ambiguity but does not emit a targeted diagnostic.

Desired outcome

Recognize the common missing-semicolon case and suggest adding ; where appropriate.

Location

ndc_parser/src/parser.rs, index-expression parsing.

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