Open
Labels
enhancementA request for a new feature or improvement.help wantedThe issue requires extra attention or help from others.
Description
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.
Metadata
Metadata
Assignees
Labels
enhancementA request for a new feature or improvement.help wantedThe issue requires extra attention or help from others.
Activity