mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 17:13:22 +00:00
04ae6196f2
The current separation between lexer and parser is a bit fuzzy when it comes to operators, aggregators and other keywords. The lexer already tries to determine the type of a token, even though that type might change depending on the context. This led to the problematic behavior that no tokens known to the lexer could be used as label names, including operators (and, by, ...), aggregators (count, quantile, ...) or other keywords (for, offset, ...). This change additionally checks whether an identifier is one of these types. We might want to check whether the specific item identification should be moved from the lexer to the parser. |
||
---|---|---|
.. | ||
fuzz-data | ||
testdata | ||
ast.go | ||
bench.go | ||
engine_test.go | ||
engine.go | ||
functions_test.go | ||
functions.go | ||
fuzz.go | ||
lex_test.go | ||
lex.go | ||
parse_test.go | ||
parse.go | ||
printer_test.go | ||
printer.go | ||
promql_test.go | ||
quantile.go | ||
test.go |