Skip to main content

Module incremental_checkpoint

Module incremental_checkpoint 

Source
Expand description

Checkpoint-based incremental parsing with rollback support. Incremental parsing implementation and helpers. Incremental parser with lexer checkpointing

This module provides a fully incremental parser that uses lexer checkpoints to efficiently re-lex only the changed portions of the input.

§Pipeline integration

Token caching and Parser::from_tokens are now wired together:

  1. parse_with_checkpoints collects parser tokens (trivia-filtered, kind-converted) and caches them alongside the lexer checkpoints.
  2. reparse_from_checkpoint assembles a mixed token list from cached tokens (before the edit) + freshly-lexed tokens (affected region) + cached or freshly-lexed tokens (after the edit), then calls Parser::from_tokens to skip re-lexing the unchanged portions.

Structs§

CheckpointedIncrementalParser
Incremental parser with lexer checkpointing
IncrementalStats
Statistics for incremental parsing
SimpleEdit
Simple edit structure for demos