1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-27 17:17:45 +00:00
Commit graph

3 commits

Author SHA1 Message Date
DQ
d602fe22eb
Support backtracking and Checkpoints 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>
2024-11-01 13:47:49 +01:00
DQ
e411243366
Update clippy and rustfmt to new nightly (#16) 2021-02-16 23:39:35 +01:00
Domenic Quirl
ac4f659470 initial commit 2021-01-13 10:23:34 +01:00