1mod node;
2mod token;
3mod element;
4mod builder;
5mod node_cache;
6
7use self::element::GreenElement;
8
9pub(crate) use self::{element::GreenElementRef, node::GreenChild};
10
11pub use self::{
12 builder::{Checkpoint, GreenNodeBuilder},
13 node::{Children, GreenNode, GreenNodeData},
14 node_cache::NodeCache,
15 token::{GreenToken, GreenTokenData},
16};
17
18/// SyntaxKind is a type tag for each token or node.
19#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
20pub struct SyntaxKind(pub u16);
21
22#[cfg(test)]
23mod tests {
24 use super::*;
25
26 #[test]
27 fn assert_send_sync() {
28 fn f<T: Send + Sync>() {}
29 f::<GreenNode>();
30 f::<GreenToken>();
31 f::<GreenElement>();
32 }
33
34 #[test]
35 fn test_size_of() {
36 use std::mem::size_of;
37
38 eprintln!("GreenNode {}", size_of::<GreenNode>());
39 eprintln!("GreenToken {}", size_of::<GreenToken>());
40 eprintln!("GreenElement {}", size_of::<GreenElement>());
41 }
42}
43