Lines Matching refs:Cursor
84 pub fn begin(&self) -> Cursor { in begin() argument
86 unsafe { Cursor::create(ptr, ptr.add(self.entries.len() - 1)) } in begin()
98 pub struct Cursor<'a> { struct
109 impl<'a> Cursor<'a> { implementation
123 Cursor { in empty()
145 Cursor { in create()
163 unsafe fn bump_ignore_group(self) -> Cursor<'a> { in bump_ignore_group()
164 unsafe { Cursor::create(self.ptr.offset(1), self.scope) } in bump_ignore_group()
191 pub fn ident(mut self) -> Option<(Ident, Cursor<'a>)> { in ident()
201 pub fn punct(mut self) -> Option<(Punct, Cursor<'a>)> { in punct()
213 pub fn literal(mut self) -> Option<(Literal, Cursor<'a>)> { in literal()
223 pub fn lifetime(mut self) -> Option<(Lifetime, Cursor<'a>)> { in lifetime()
241 pub fn group(mut self, delim: Delimiter) -> Option<(Cursor<'a>, DelimSpan, Cursor<'a>)> { in group()
253 let inside_of_group = unsafe { Cursor::create(self.ptr.add(1), end_of_group) }; in group()
254 let after_group = unsafe { Cursor::create(end_of_group, self.scope) }; in group()
264 pub fn any_group(self) -> Option<(Cursor<'a>, Delimiter, DelimSpan, Cursor<'a>)> { in any_group()
269 let inside_of_group = unsafe { Cursor::create(self.ptr.add(1), end_of_group) }; in any_group()
270 let after_group = unsafe { Cursor::create(end_of_group, self.scope) }; in any_group()
277 pub(crate) fn any_group_token(self) -> Option<(Group, Cursor<'a>)> { in any_group_token()
280 let after_group = unsafe { Cursor::create(end_of_group, self.scope) }; in any_group_token()
306 pub fn token_tree(self) -> Option<(TokenTree, Cursor<'a>)> { in token_tree()
315 let rest = unsafe { Cursor::create(self.ptr.add(len), self.scope) }; in token_tree()
352 pub(crate) fn skip(mut self) -> Option<Cursor<'a>> { in skip()
370 Some(unsafe { Cursor::create(self.ptr.add(len), self.scope) }) in skip()
384 impl<'a> Copy for Cursor<'a> {} implementation
386 impl<'a> Clone for Cursor<'a> { implementation
392 impl<'a> Eq for Cursor<'a> {} implementation
394 impl<'a> PartialEq for Cursor<'a> { implementation
400 impl<'a> PartialOrd for Cursor<'a> { implementation
410 pub(crate) fn same_scope(a: Cursor, b: Cursor) -> bool { in same_scope() argument
414 pub(crate) fn same_buffer(a: Cursor, b: Cursor) -> bool { in same_buffer() argument
418 fn start_of_buffer(cursor: Cursor) -> *const Entry { in start_of_buffer()
427 pub(crate) fn cmp_assuming_same_buffer(a: Cursor, b: Cursor) -> Ordering { in cmp_assuming_same_buffer() argument
431 pub(crate) fn open_span_of_group(cursor: Cursor) -> Span { in open_span_of_group()