perl-edit 0.12.1

Text edit representation and helpers for incremental Perl parsing
Documentation
  • Coverage
  • 100%
    26 out of 26 items documented0 out of 19 items with examples
  • Size
  • Source code size: 81.91 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 1s Average build duration of successful builds.
  • all releases: 1m 1s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • EffortlessMetrics/perl-lsp
    0 1 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • EffortlessSteven

perl-edit

Edit tracking primitives for incremental Perl parsing.

Overview

perl-edit provides types and algorithms for tracking text edits to Perl source code and computing their positional effects. It tracks both byte offsets and line/column coordinates, making it suitable for incremental parsing and LSP document synchronization.

Public API

  • Edit -- a single text edit with start/old-end/new-end byte offsets and positions. Methods: byte_shift(), line_shift(), affects_byte(), overlaps_range(), apply_to_position(), apply_to_range().
  • EditSet -- an ordered collection of edits, sorted by start position. Methods: add(), apply_to_position(), apply_to_range(), affects_range(), byte_shift_at(), affected_ranges(), len(), is_empty(), edits().

Workspace Role

Tier 1 leaf crate in the tree-sitter-perl-rs workspace. Depends only on perl-position-tracking for Position and Range types. Used by incremental parsing and document update pipelines.

License

MIT OR Apache-2.0