| 288 | } |
| 289 | |
| 290 | std::unique_ptr<DirectExpressionStep> CreateDirectOptionalOrStep( |
| 291 | int64_t expr_id, std::unique_ptr<DirectExpressionStep> optional, |
| 292 | std::unique_ptr<DirectExpressionStep> alternative, bool is_or_value, |
| 293 | bool short_circuiting) { |
| 294 | auto kind = |
| 295 | is_or_value ? OptionalOrKind::kOrValue : OptionalOrKind::kOrOptional; |
| 296 | if (short_circuiting) { |
| 297 | return std::make_unique<DirectOptionalOrStep>(expr_id, std::move(optional), |
| 298 | std::move(alternative), kind); |
| 299 | } else { |
| 300 | return std::make_unique<ExhaustiveDirectOptionalOrStep>( |
| 301 | expr_id, std::move(optional), std::move(alternative), kind); |
| 302 | } |
| 303 | } |
| 304 | |
| 305 | } // namespace google::api::expr::runtime |
no outgoing calls