Skip to content

Implement AST multi-error recovery - #383

Open
LesterEvSe wants to merge 4 commits into
BlockstreamResearch:masterfrom
LesterEvSe:feat/ast-multierrors
Open

Implement AST multi-error recovery#383
LesterEvSe wants to merge 4 commits into
BlockstreamResearch:masterfrom
LesterEvSe:feat/ast-multierrors

Conversation

@LesterEvSe

Copy link
Copy Markdown
Collaborator

Analysis now reports every independent error in one pass instead of stopping at
the first.

  • Poison, not fake values; Error variants in the parse tree, AST, and type
    system (TypeInner::Error); recovery emits these instead of fabricated units,
    aliases, or sizes.
  • No cascades; poisoned types are absorbed during analysis (is_error guards
    and ResolvedType::compatible), so one broken construct does not spawn secondary
    errors.
  • Collect, do not abort; Scope carries a diagnostics sink; containers record
    an error and keep analyzing siblings, and Program::analyze returns Option.
  • Parser split; parse_from_str (fragments, first error) vs
    parse_from_content (files, collect all), over one shared core.

@LesterEvSe
LesterEvSe requested a review from KyrylR July 28, 2026 15:51
@LesterEvSe LesterEvSe self-assigned this Jul 28, 2026
@LesterEvSe
LesterEvSe requested a review from delta1 as a code owner July 28, 2026 15:51
This was linked to issues Jul 28, 2026
@LesterEvSe
LesterEvSe force-pushed the feat/ast-multierrors branch 2 times, most recently from 40a0150 to bbe5b41 Compare July 29, 2026 12:35
@LesterEvSe
LesterEvSe force-pushed the feat/ast-multierrors branch from bbe5b41 to 18f96cb Compare July 29, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error recovery in analysis Implement error states in parser

1 participant