promql: Eliminate dead code (#6215)

peek() already ensures to not return a ItemComment so checking for this
is redundant.

Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
pull/6224/head
Tobias Guggenmos 5 years ago committed by Julius Volz
parent 95d3d3f7ed
commit fe80cf4734

@ -106,9 +106,6 @@ func (p *parser) parseExpr() (expr Expr, err error) {
defer p.recover(&err)
for p.peek().typ != ItemEOF {
if p.peek().typ == ItemComment {
continue
}
if expr != nil {
p.errorf("could not parse remaining input %.15q...", p.lex.input[p.lex.lastPos:])
}

Loading…
Cancel
Save