Lines Matching refs:cursor

132     fn peek(cursor: Cursor) -> bool;
159 fn peek(cursor: Cursor) -> bool;
168 fn peek_impl(cursor: Cursor, peek: fn(ParseStream) -> bool) -> bool {
175 let buffer = crate::parse::new_parse_buffer(scope, cursor, unexpected);
183 fn peek(cursor: Cursor) -> bool {
187 peek_impl(cursor, peek)
215 fn peek(cursor: Cursor) -> bool {
216 cursor.$get().is_some()
238 fn peek(cursor: Cursor) -> bool {
239 <Self as CustomToken>::peek(cursor)
334 fn peek(cursor: Cursor) -> bool {
335 parsing::peek_keyword(cursor, $token)
473 fn peek(cursor: Cursor) -> bool {
474 parsing::peek_punct(cursor, $token)
582 input.step(|cursor| {
583 if let Some((ident, rest)) = cursor.ident() {
588 if let Some((punct, rest)) = cursor.punct() {
593 Err(cursor.error("expected `_`"))
600 fn peek(cursor: Cursor) -> bool {
601 if let Some((ident, _rest)) = cursor.ident() {
604 if let Some((punct, _rest)) = cursor.punct() {
694 fn peek(cursor: Cursor) -> bool {
695 lookahead::is_delimiter(cursor, Delimiter::Parenthesis)
705 fn peek(cursor: Cursor) -> bool {
706 lookahead::is_delimiter(cursor, Delimiter::Brace)
716 fn peek(cursor: Cursor) -> bool {
717 lookahead::is_delimiter(cursor, Delimiter::Bracket)
727 fn peek(cursor: Cursor) -> bool {
728 lookahead::is_delimiter(cursor, Delimiter::None)
1026 input.step(|cursor| {
1027 if let Some((ident, rest)) = cursor.ident() {
1032 Err(cursor.error(format!("expected `{}`", token)))
1036 pub(crate) fn peek_keyword(cursor: Cursor, token: &str) -> bool {
1037 if let Some((ident, _rest)) = cursor.ident() {
1052 input.step(|cursor| {
1053 let mut cursor = *cursor;
1057 match cursor.punct() {
1067 cursor = rest;
1078 pub fn peek_punct(mut cursor: Cursor, token: &str) -> bool {
1080 match cursor.punct() {
1089 cursor = rest;