Tags: domenicquirl/cstree
Tags
Support backtracking and `Checkpoint`s across nodes (#68) * Add [`GreenTreeBuilder::revert`] to support backtracking parsers Rowan, and hence CSTree, is designed around hand-written parsers. In particular, the APIs for *building* trees require that each token is recorded only once. Some parsers, and especially parser combinators, use backtracking instead, where the same token may be seen multiple times. To support this, add a new `revert` function which discards all tokens seen since the last checkpoint. * allow checkpointing across nodes (within reason) * clean up asserts and expand documentation * add Changelog entry * prepare v0.12.2 release --------- Co-authored-by: jyn <github@jyn.dev> Co-authored-by: Domenic Quirl <DomenicQuirl@protonmail.com>