mirror of
https://github.com/prometheus/prometheus
synced 2024-12-24 15:32:48 +00: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)
|
||||
|
||||
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…
Reference in New Issue
Block a user