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.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions