From 188b0f96f98feaa0771f941343887c46113c8ced Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 22 May 2021 16:53:47 +0300 Subject: Add more docs --- crates/tt/src/buffer.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'crates/tt') 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 @@ -//! FIXME: write short doc here - +//! Stateful iteration over token trees. +//! +//! We use this as the source of tokens for parser. use crate::{Leaf, Subtree, TokenTree}; #[derive(Copy, Clone, Debug, Eq, PartialEq)] @@ -104,7 +105,7 @@ impl<'t> TokenBuffer<'t> { /// Creates a cursor referencing the first token in the buffer and able to /// traverse until the end of the buffer. - pub fn begin(&self) -> Cursor { + pub fn begin(&self) -> Cursor<'_> { Cursor::create(self, EntryPtr(EntryId(0), 0)) } -- cgit v1.2.3