1 #pragma once
2 
3 #include "filter_expr_parser_ast.hpp"
4 
5 #include <memory>
6 #include <optional>
7 #include <string_view>
8 
9 namespace redfish
10 {
11 struct FilterExpressionPrinter
12 {
13     using result_type = std::string;
14     std::string operator()(double x) const;
15     std::string operator()(int64_t x) const;
16     std::string operator()(const filter_ast::QuotedString& x) const;
17     std::string operator()(const filter_ast::UnquotedString& x) const;
18     std::string operator()(const filter_ast::LogicalNot& x) const;
19     std::string operator()(const filter_ast::LogicalOr& x) const;
20     std::string operator()(const filter_ast::LogicalAnd& x) const;
21     std::string operator()(const filter_ast::Comparison& x) const;
22     std::string operator()(const filter_ast::BooleanOp& operation) const;
23 };
24 
25 std::optional<filter_ast::LogicalAnd> parseFilter(std::string_view expr);
26 } // namespace redfish
27