Lines Matching refs:lookahead
3 use crate::sealed::lookahead::Sealed;
21 /// Consuming tokens from the source stream after constructing a lookahead
22 /// object does not also advance the lookahead object.
35 /// // On invalid input, lookahead gives us a reasonable error message.
49 /// let lookahead = input.lookahead1();
50 /// if lookahead.peek(Ident) {
52 /// } else if lookahead.peek(Lifetime) {
54 /// } else if lookahead.peek(Token![const]) {
57 /// Err(lookahead.error())
77 lookahead: &Lookahead1,
81 if peek(lookahead.cursor) {
84 lookahead.comparisons.borrow_mut().push(display());
111 /// have been peeked against this lookahead instance.