Expand description
The parser implementation.
parse()
parses the given query to Expr
, which is the abstract syntax tree (AST) struct
in this crate. And Expr
is componsed by servaral structs exposed in this module.
Notes that in PromQL the parsed Expr
is only a part of an query. It would also needs other
parameters like “start”/“end” time or “step” time etc, which is included in EvalStmt
.
Re-exports§
pub use ast::AggregateExpr;
pub use ast::AtModifier;
pub use ast::BinModifier;
pub use ast::BinaryExpr;
pub use ast::Call;
pub use ast::EvalStmt;
pub use ast::Expr;
pub use ast::Extension;
pub use ast::LabelModifier;
pub use ast::MatrixSelector;
pub use ast::NumberLiteral;
pub use ast::Offset;
pub use ast::ParenExpr;
pub use ast::StringLiteral;
pub use ast::SubqueryExpr;
pub use ast::UnaryExpr;
pub use ast::VectorMatchCardinality;
pub use ast::VectorSelector;
pub use function::Function;
pub use function::FunctionArgs;
pub use lex::lexer;
pub use parse::parse;
Modules§
Traits§
- Prettier
- Approach