mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 22:36:08 +00:00
Removing every repeat parsed the whole document once per repeat, so k repeats in an n-byte file cost about k x n parser work. Members are now deleted from one tree, last to first: each deletion edits text at or after the end of the member before it, so earlier offsets stay valid, and separators are judged against the members still present. 2,000 repeats with interleaved peers and comments drop from 9.6 s to 0.1 s. The acceptance fixture for an escaped repeat wrote `rea` inside a template literal, which TypeScript decoded to a second plain `rea`; it now keeps the JSON escape and asserts that it does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>