1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-27 17:17:45 +00:00
cstree/rustfmt.toml
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

21 lines
436 B
TOML

unstable_features = true
edition = "2021"
max_width = 120
comment_width = 120
wrap_comments = true
format_code_in_doc_comments = true
format_macro_matchers = true
imports_granularity = "Crate"
reorder_impl_items = true
use_field_init_shorthand = true
# should be 1, but as of writing is too unstable and introduces blank lines at the start of random blocks
blank_lines_lower_bound = 0
struct_field_align_threshold = 8