1
Fork 0
mirror of https://github.com/RGBCube/cstree synced 2025-07-29 10:07:44 +00:00
Commit graph

9 commits

Author SHA1 Message Date
fb8cc54104
Implement Resolver and Interner for Arc<MultiThreadedTokenInterner> (#72)
* Implement traits for Arc<MultiThreadedTokenInterner>

* implement Resolver for Arc<Resolver>, update docs
2025-03-20 22:33:19 +01:00
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
Alona Enraght-Moony
1080120348
implement Hash and Eq for ResolvedNode and ResolvedToken. (#63)
These simply forward to the impls for SyntaxNode and SyntaxToken respectivly.
2024-08-21 17:47:47 +02:00
DQ
4d1c90a56f
[Changelog] add additional note for upgrading with lasso compat 2024-06-22 12:00:23 +02:00
DQ
574adbde8f
Update CHANGELOG.md 2023-04-26 20:22:12 +02:00
DQ
c5279bae7d
Add derive macro for Syntax (used to be Language) (#51) 2023-04-18 20:10:35 +02:00
DQ
2aa543036f
Use 32 bits for RawSyntaxKind internally (#49) 2023-04-07 19:18:47 +02:00
DQ
16f7a3bd80
Set up a module structure (#44) 2023-04-07 18:06:51 +02:00
DQ
e7b00a603e
Performance Improvements (#43)
- add `Language::static_text` and optimize static tokens
 - re-use existing `ThinArc`s in `GreenNodeBuilder::finish_node`
 - replace `*mut` in `SyntaxNode` with `NonNull`
 - add CHANGELOG
2022-08-25 22:22:45 +02:00