nextToken returns the next token from the promlexer. It skips over tabs and spaces.
()
| 283 | // nextToken returns the next token from the promlexer. It skips over tabs |
| 284 | // and spaces. |
| 285 | func (p *PromParser) nextToken() token { |
| 286 | for { |
| 287 | if tok := p.l.Lex(); tok != tWhitespace { |
| 288 | return tok |
| 289 | } |
| 290 | } |
| 291 | } |
| 292 | |
| 293 | func (p *PromParser) parseError(exp string, got token) error { |
| 294 | e := min(len(p.l.b), p.l.i+1) |
no test coverage detected