// peek returns but does not consume the next token.
768242
func (t *tree) peek() item {
	if t.peekCount > 0 {
		return t.token[t.peekCount-1]
	}
	t.peekCount = 1
	t.token[0] = t.lex.nextItem()
	return t.token[0]
}
978925
func (rb *ringBuffer) Peek() (interface{}, bool) {
	if rb.start.used == false {
		return nil, false
	}
	return rb.start.value, true
}
529012
func (r *Ring) Peek() interface{} {
	r.Lock()
	defer r.Unlock()

	r.checkInit()
	if r.head == -1 {
		return nil
	}
	return r.get(r.tail)
}
50376
func (pq *PriorityQueue) Peek() Item {
	pq.lock.Lock()
	defer pq.lock.Unlock()
	if len(pq.items) > 0 {
		return pq.items[0]
	}
	return nil
}
1064225
func (s *FIFO) Peek() (T, bool) {
	if s.front == nil {
		return nil, false
	}
	return s.front.v, true
}
510782
func (s Set) Peek() (string, bool) {
	for k := range s {
		return k, true
	}
	return "", false
}
964835
func (b *Buffer) Peek() float64 {
	if b.size == 0 {
		return 0
	}
	return b.array[b.head]
}
20221
func (p PendingEvaluations) Peek() *structs.Evaluation {
	n := len(p)
	if n == 0 {
		return nil
	}
	return p[n-1]
}
53742
func (t *Tree) peek() token {
	tok := t.next()
	t.backup()

	return tok
}
20913
func (limiter *Limiter) Peek(ctx context.Context, key string) (Context, error) {
	return limiter.Store.Peek(ctx, key, limiter.Rate)
}
757490
func (p *Parser) PeekOne(typ TokenType, vals ...string) *Token {
	for _, v := range vals {
		t := p.PeekN(0, typ, v)
		if t != nil {
			return t
		}
	}
	return nil
}
1288402
func (z *Lexer) Peek(pos int) byte {
	pos += z.pos
	return z.buf[pos]
}
861352
func (sw *stackWrapper) peek(idx int) *big.Int {
	if len(sw.stack.Data()) <= idx {
		// TODO(karalabe): We can't js-throw from Go inside duktape inside Go. The Go
		// runtime goes belly up https://github.com/golang/go/issues/15639.
		log.Warn("Tracer accessed out of bound stack", "size", len(sw.stack.Data()), "index", idx)
		return new(big.Int)
	}
	return sw.stack.Data()[len(sw.stack.Data())-idx-1]
}
803361
func (lx *lexer) peek() rune {
	r := lx.next()
	lx.backup()
	return r
}
270441
func (c *LRUCache) Peek(key interface{}) (value interface{}, ok bool) {
	defer c.mutex.Unlock()
	c.mutex.Lock()

	if ele, hit := c.cache[key]; hit {
		entry := ele.Value.(*cacheRecord)
		return entry.value, true
	}
	return nil, false
}
750308
func (q *Queue) Peek() (*Item, error) {
	q.RLock()
	defer q.RUnlock()

	// Check if queue is closed.
	if !q.isOpen {
		return nil, ErrDBClosed
	}

	return q.getItemByID(q.head + 1)
}
576242
func (s *LIFO) Peek() (T, bool) {
	if s.top == nil {
		return nil, false
	}
	return s.top.v, true
}