Skip to content

Migrate type alias, enum, and variant declaration errors to structured diagnostics #398

Open

Description

@LunaStev

Tracked by #346.

Why

Declaration parsing in front/parser/src/parser/decl.rs still prints many syntax errors for type, integer enum, and payload variant declarations before returning failure.

Scope

  • Convert syntax failures for these three declaration families to structured parser errors.
  • Cover missing names, separators, representation types, payload types, commas, semicolons, and closing braces.
  • Keep semantic checks such as cycles, duplicate cases, and variant exhaustiveness unchanged.
  • Do not merge the distinct enum and variant models.

Completion criteria

  • Converted declaration failures no longer print directly.
  • Each declaration family has positive and negative regression coverage.
  • Diagnostics retain context, expected/found information, and a useful location.
  • Existing generic and variant frontend tests pass.

Activity

  1. added
    enhancement
    good first issue
    needs testing
    on Aug 28, 2026
  2. self-assigned this
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issueneeds testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions