| 881 | } |
| 882 | |
| 883 | std::any ParserVisitor::visitExpr(CelParser::ExprContext* ctx) { |
| 884 | auto result = ExprFromAny(visit(ctx->e)); |
| 885 | if (!ctx->op) { |
| 886 | return ExprToAny(std::move(result)); |
| 887 | } |
| 888 | std::vector<Expr> arguments; |
| 889 | arguments.reserve(3); |
| 890 | arguments.push_back(std::move(result)); |
| 891 | int64_t op_id = factory_.NextId(SourceRangeFromToken(ctx->op)); |
| 892 | arguments.push_back(ExprFromAny(visit(ctx->e1))); |
| 893 | arguments.push_back(ExprFromAny(visit(ctx->e2))); |
| 894 | |
| 895 | return ExprToAny( |
| 896 | factory_.NewCall(op_id, CelOperator::CONDITIONAL, std::move(arguments))); |
| 897 | } |
| 898 | |
| 899 | std::any ParserVisitor::visitConditionalOr( |
| 900 | CelParser::ConditionalOrContext* ctx) { |
nothing calls this directly
no test coverage detected