Skip to content

Replace unsupported type println calls with structured parser diagnostics #425

Closed

Description

@LunaStev

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.

Activity

  1. added
    enhancement
    good first issue
    needs testing
    on Aug 29, 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