diff options
author | Aleksey Kladov <[email protected]> | 2021-05-22 14:53:47 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-05-22 14:53:47 +0100 |
commit | 188b0f96f98feaa0771f941343887c46113c8ced (patch) | |
tree | 870d3afb3479ea9f0c323d7c539ce615ec4a4651 /crates/tt/src | |
parent | e6776c3e1b66c8946873d20e1e3bc1d743c952fe (diff) |
Add more docs
Diffstat (limited to 'crates/tt/src')
-rw-r--r-- | crates/tt/src/buffer.rs | 7 |
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. | ||
3 | use crate::{Leaf, Subtree, TokenTree}; | 4 | use 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 | ||