prometheus/promql
Tobias Guggenmos c63259b83c promql: Clean up parser struct (#6360)
* promql: Clean up parser struct

The parser struct used two have two somewhat misused fields:

peekCount int
token     [3]item

By reading the code carefully one notices, that peekCount always has the value 0 or 1 and that only the first element of token is ever accessed.

To make this clearer, this commit replaces the token array with a single variable and the peekCount int with a boolean.

Signed-off-by: Tobias Guggenmos <tguggenm@redhat.com>
2019-11-25 12:29:14 +00:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
testdata Fix scalar-vector comparisons (#5454) 2019-04-11 10:42:16 +01:00
ast.go PromQL: Reduce Code duplication in AST traversion (#6362) 2019-11-25 11:41:59 +00:00
bench_test.go Refactor testutil.NewStorage into a new package 2019-08-08 19:43:04 -06:00
engine.go fix word 'substracting' to 'subtracting' (#5822) 2019-08-01 15:44:38 +01:00
engine_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
functions.go refine error handling in prometheus (#5388) 2019-03-26 00:01:12 +01:00
functions_test.go Refactor testutil.NewStorage into a new package 2019-08-08 19:43:04 -06:00
fuzz.go fix fuzz targets (#5851) 2019-08-12 20:47:57 +02:00
lex.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
lex_test.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
parse.go promql: Clean up parser struct (#6360) 2019-11-25 12:29:14 +00:00
parse_test.go Improve PromQL parser performance by making it non-concurrent (#6356) 2019-11-21 18:43:09 +00:00
printer.go PromQL: Reduce Code duplication in AST traversion (#6362) 2019-11-25 11:41:59 +00:00
printer_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
promql_test.go promql: Move tests to testutil (#6103) 2019-10-09 18:06:53 -06:00
quantile.go func name ref correct "qauntile" -> "quantile" (#5834) 2019-08-06 06:11:16 +01:00
query_logger.go Merge the 2.13 release branch (#6169) 2019-10-18 02:21:58 +03:00
query_logger_test.go Merge the 2.13 release branch (#6169) 2019-10-18 02:21:58 +03:00
test.go Third correction (#6012) 2019-09-20 10:48:56 +01:00
test_test.go Fix some spelling issues (#5361) 2019-03-14 14:38:54 +00:00
value.go fix word 'seriess' to 'series' (#5828) 2019-08-04 16:52:51 +01:00