Skip to content

Track the remaining structured parser diagnostic migration #346

Open

Description

@LunaStev

Problem

Wave has a structured ParseDiagnostic and unified WaveError rendering path, but legacy parser routines still print errors directly to stdout and then return None. The top-level parser consequently replaces useful local context with generic messages such as "failed to parse function declaration".

This tracking issue replaces the broad diagnostic requests in #114 and #168 with bounded parser tasks.

Scope

  • Return structured syntax diagnostics from legacy parser routines.
  • Preserve the token/span that actually caused the failure.
  • Keep human and JSON diagnostic output consistent.
  • Remove parser-side error printing as individual grammar paths are migrated.
  • Add one positive and one negative regression for each migrated path.

Out of scope

  • Changing Wave language semantics.
  • Replacing the existing error crate.
  • Adding typo recovery that silently changes the parsed program.

Completion criteria

  • Declaration and function parser failures preserve their local diagnostic.
  • Control-flow and expression parser failures preserve their local diagnostic.
  • Parser failures do not write ad-hoc error lines to stdout.
  • Human and JSON error formats identify the same source location.
  • Existing valid corpus behavior remains unchanged.

Child issues should each cover one grammar family and remain independently reviewable.

Activity

  1. added
    enhancement
    help wanted
    on Aug 25, 2026
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

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions