fn at(&mut self, n: usize) -> Result<Option<Token>, ParseError> {
        if let Some(error) = self.error.take() {
            return Err(error);
        }

        while self.buf.len() <= n {
            let token = match self.source.next()? {
                Some(token) => token,
                None => break,
            };

            self.last = Some(token.span);
            self.buf.push_back(token);
        }

        Ok(self.buf.get(n).copied())
    }
/// Make sure there are at least `n` items in the buffer, and return the
/// item at that point.
Make sure there are at least `n` items in the buffer, and return the
item at that point.
Make sure there are at least ` n ` items in the buffer and return the item at that point .
fn at(&mut self, n: usize) -> Result<Option<Token>, ParseError> {
        if let Some(error) = self.error.take() {
            return Err(error);
        }
        while self.buf.len() <= n {
            let token = match self.source.next()? {
                Some(token) => token,
                None => break,
            };
            self.last = Some(token.span);
            self.buf.push_back(token);
        }
        Ok(self.buf.get(n).copied())
    }
fn at ( & mut self , n : usize ) -> Result < Option < Token > , ParseError > { if let Some ( error ) = self . error . take ( ) { return Err ( error ) ; } while self . buf . len ( ) <= n { let token = match self . source . next ( ) ? { Some ( token ) => token , None => break , } ; self . last = Some ( token . span ) ; self . buf . push_back ( token ) ; } Ok ( self . buf . get ( n ) . copied ( ) ) }
Make sure there are at least `n` items in the buffer, and return the
item at that point.
Make sure there are at least ` n ` items in the buffer and return the item at that point .
&mut self
n
usize
&mut self
n
usize