aboutsummaryrefslogtreecommitdiff
path: root/crates/tt/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-22 14:54:13 +0100
committerGitHub <[email protected]>2021-05-22 14:54:13 +0100
commitd56e52402eedbd738b5161cd1e5a8c152cb65e21 (patch)
treec88222888e201b2173cd4a15673bd879cb88dd95 /crates/tt/src
parent542337eca49986d785db2318bfe9c70809d4a229 (diff)
parent188b0f96f98feaa0771f941343887c46113c8ced (diff)
Merge #8922
8922: Add more docs r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/tt/src')
-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