Replace unsupported type println calls with structured parser diagnostics
- Dominant language
- Rust
- Stars
- 53
- Forks
- 16
- Avg merge
- 4h 22m
- Merged PRs (30d)
- 46
Description
## Summary
The declaration parser still reports some unknown or unsupported types with direct `println!` calls before returning an error. This bypasses Wave’s structured diagnostic renderer and prevents consistent error codes, spans, context, and JSON output.
## Relevant code
- `front/parser/src/parser/decl.rs`
- existing structured parser diagnostic helpers and fixtures
## Scope
Replace the direct output paths used while parsing declaration parameter and return types with structured parser errors. Do not redesign the complete diagnostic system in this issue.
## Acceptance criteria
- The parser does not print unknown-type messages directly.
- Both affected declaration paths return structured diagnostics.
- Diagnostics identify the unsupported type token and retain its source location.
- Human-readable and JSON diagnostic modes remain valid.
- Focused parser fixtures cover parameter and return-type failures.
- Existing parser tests continue to pass.
Contributor guide
Research direction
Start in front/parser/src/parser/decl.rs by locating the direct println! paths for unsupported declaration parameter and return types, then read the existing structured parser diagnostic helpers and fixtures. Run the focused parser fixtures before changing them. Done means both paths return structured diagnostics with the unsupported token and source location, while human-readable and JSON modes and existing parser tests remain valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100