Lines Matching refs:entries
18 // Group entries contain the offset to the matching End entry.
23 // End entries contain the offset (negative) to the start of the buffer.
33 entries: Box<[Entry]>,
37 fn recursive_new(entries: &mut Vec<Entry>, stream: TokenStream) {
40 TokenTree::Ident(ident) => entries.push(Entry::Ident(ident)),
41 TokenTree::Punct(punct) => entries.push(Entry::Punct(punct)),
42 TokenTree::Literal(literal) => entries.push(Entry::Literal(literal)),
44 let group_start_index = entries.len();
45 entries.push(Entry::End(0)); // we replace this below
46 Self::recursive_new(entries, group.stream());
47 let group_end_index = entries.len();
48 entries.push(Entry::End(-(group_end_index as isize)));
50 entries[group_start_index] = Entry::Group(group, group_end_offset);
67 let mut entries = Vec::new();
68 Self::recursive_new(&mut entries, stream);
69 entries.push(Entry::End(-(entries.len() as isize)));
71 entries: entries.into_boxed_slice(),
78 let ptr = self.entries.as_ptr();
79 unsafe { Cursor::create(ptr, ptr.add(self.entries.len() - 1)) }