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 7 times, most recently from ad880be to a378398 Compare July 30, 2026 13:43
@LesterEvSe
LesterEvSe force-pushed the feat/ast-multierrors branch from a378398 to 864fdcd Compare August 5, 2026 13:49
@LesterEvSe
LesterEvSe force-pushed the feat/ast-multierrors branch from 864fdcd to 471d4a7 Compare August 5, 2026 13:56
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