wavefnd / wavefnd/Wave

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

Open
#398 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue needs testing
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start in front/parser/src/parser/decl.rs and trace parsing for type aliases, integer enums, and payload variants. Use the existing generic and variant frontend tests as the regression-test entry points, covering positive and negative cases. Done means declaration syntax failures are structured, retain context, expected/found information, and location, while semantic checks and existing tests remain unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.