]>
Commit | Line | Data |
---|---|---|
f035d41b XL |
1 | //! A generic library for lossless syntax trees. |
2 | //! See `examples/s_expressions.rs` for a tutorial. | |
3 | #![forbid( | |
4 | // missing_debug_implementations, | |
5 | unconditional_recursion, | |
6 | future_incompatible, | |
7 | // missing_docs, | |
8 | )] | |
9 | #![deny(unsafe_code)] | |
10 | ||
11 | #[allow(unsafe_code)] | |
12 | mod green; | |
13 | #[allow(unsafe_code)] | |
14 | pub mod cursor; | |
15 | ||
16 | pub mod api; | |
17 | mod syntax_text; | |
18 | mod utility_types; | |
19 | #[cfg(feature = "serde1")] | |
20 | mod serde_impls; | |
21 | ||
22 | // Reexport types for working with strings. We might be too opinionated about | |
23 | // these, as a custom interner might work better, but `SmolStr` is a pretty good | |
24 | // default. | |
25 | pub use smol_str::SmolStr; | |
26 | pub use text_size::{TextRange, TextSize, TextLen}; | |
27 | ||
28 | pub use crate::{ | |
29 | api::{ | |
30 | Language, SyntaxElement, SyntaxElementChildren, SyntaxNode, SyntaxNodeChildren, SyntaxToken, | |
31 | }, | |
32 | green::{Checkpoint, Children, GreenNode, GreenNodeBuilder, GreenToken, SyntaxKind}, | |
33 | syntax_text::SyntaxText, | |
34 | utility_types::{Direction, NodeOrToken, TokenAtOffset, WalkEvent}, | |
35 | }; |