Skip to main content

Module recovery

Module recovery 

Source
Expand description

Error recovery strategies and traits for the Perl parser. Error recovery for the Perl parser

This module implements error recovery strategies to continue parsing even when syntax errors are encountered. This is essential for IDE scenarios where code is often incomplete or temporarily invalid.

§Progress Invariant

All recovery operations guarantee forward progress: every recovery attempt must consume at least one token or exit. This prevents infinite loops when the parser cannot make sense of the input.

§Budget Awareness

Recovery operations respect the ParseBudget limits to prevent runaway parsing on adversarial input. When budget is exhausted, recovery returns immediately with an appropriate error node.

Structs§

ParseError
Error information with recovery context for comprehensive Perl parsing error handling.

Enums§

RecoveryResult
Result of a recovery operation.
SyncPoint
Synchronization tokens for error recovery

Traits§

ErrorRecovery
Error recovery strategies
ParserErrorRecovery
Parser extensions for error recovery
StatementRecovery
Recovery-aware statement parsing