aboutsummaryrefslogtreecommitdiff
path: root/crates/tt
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-05-22 14:53:47 +0100
committerAleksey Kladov <[email protected]>2021-05-22 14:53:47 +0100
commit188b0f96f98feaa0771f941343887c46113c8ced (patch)
tree870d3afb3479ea9f0c323d7c539ce615ec4a4651 /crates/tt
parente6776c3e1b66c8946873d20e1e3bc1d743c952fe (diff)
Add more docs
Diffstat (limited to 'crates/tt')
-rw-r--r--crates/tt/src/buffer.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/tt/src/buffer.rs b/crates/tt/src/buffer.rs
index 3606c887d..e0021039a 100644
--- a/crates/tt/src/buffer.rs
+++ b/crates/tt/src/buffer.rs
@@ -1,5 +1,6 @@
1//! FIXME: write short doc here 1//! Stateful iteration over token trees.
2 2//!
3//! We use this as the source of tokens for parser.
3use crate::{Leaf, Subtree, TokenTree}; 4use crate::{Leaf, Subtree, TokenTree};
4 5
5#[derive(Copy, Clone, Debug, Eq, PartialEq)] 6#[derive(Copy, Clone, Debug, Eq, PartialEq)]
@@ -104,7 +105,7 @@ impl<'t> TokenBuffer<'t> {
104 105
105 /// Creates a cursor referencing the first token in the buffer and able to 106 /// Creates a cursor referencing the first token in the buffer and able to
106 /// traverse until the end of the buffer. 107 /// traverse until the end of the buffer.
107 pub fn begin(&self) -> Cursor { 108 pub fn begin(&self) -> Cursor<'_> {
108 Cursor::create(self, EntryPtr(EntryId(0), 0)) 109 Cursor::create(self, EntryPtr(EntryId(0), 0))
109 } 110 }
110 111