mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
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>
This commit is contained in:
parent
95d3d3f7ed
commit
fe80cf4734
|
@ -106,9 +106,6 @@ func (p *parser) parseExpr() (expr Expr, err error) {
|
||||||
defer p.recover(&err)
|
defer p.recover(&err)
|
||||||
|
|
||||||
for p.peek().typ != ItemEOF {
|
for p.peek().typ != ItemEOF {
|
||||||
if p.peek().typ == ItemComment {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if expr != nil {
|
if expr != nil {
|
||||||
p.errorf("could not parse remaining input %.15q...", p.lex.input[p.lex.lastPos:])
|
p.errorf("could not parse remaining input %.15q...", p.lex.input[p.lex.lastPos:])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue