Skip to content

Commit e4ab990

Browse files
committed
Add more doc
1 parent ab160cd commit e4ab990

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ pub fn rust_grammar() -> Grammar {
2626
}
2727

2828
/// A node, like `A = 'b' | 'c'`.
29+
///
30+
/// Indexing into a [`Grammar`] with a [`Node`] returns a reference to a
31+
/// [`NodeData`].
2932
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
3033
pub struct Node(usize);
3134

3235
/// A token, denoted with single quotes, like `'+'` or `'struct'`.
36+
///
37+
/// Indexing into a [`Grammar`] with a [`Token`] returns a reference to a
38+
/// [`TokenData`].
3339
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
3440
pub struct Token(usize);
3541

0 commit comments

Comments
 (0)