promql/parse.go
func (p *parser) next() item {
	if p.peekCount > 0 {
		p.peekCount--
	} else {
		t := p.lex.nextItem()
		// Skip comments.
		for t.typ == ItemComment {
			t = p.lex.nextItem()
		}
		p.token[0] = t
	}
	if p.token[p.peekCount].typ == ItemError {
		p.errorf("%s", p.token[p.peekCount].val)
	}
	return p.token[p.peekCount]
}
func (p *parser) next() item {
	if p.peekCount > 0 {
		p.peekCount--
	} else {
		t := p.lex.nextItem()
		// Skip comments.
		for t.typ == ItemComment {
			t = p.lex.nextItem()
		}
		p.token[0] = t
	}
	if p.token[p.peekCount].typ == ItemError {
		p.errorf("%s", p.token[p.peekCount].val)
	}
	return p.token[p.peekCount]
}
func ( p * parser ) next ( ) item { if p . peekCount > 0 { p . peekCount -- } else { t := p . lex . nextItem ( ) // Skip comments. for t . typ == ItemComment { t = p . lex . nextItem ( ) } p . token [ 0 ] = t } if p . token [ p . peekCount ] . typ == ItemError { p . errorf ( " " , p . token [ p . peekCount ] . val ) } return p . token [ p . peekCount ] }
// next returns the next token.
next returns the next token .