| 105 | } |
| 106 | |
| 107 | absl::StatusOr<std::unique_ptr<CelExpressionRecursiveImpl>> |
| 108 | CelExpressionRecursiveImpl::Create( |
| 109 | absl_nonnull std::shared_ptr<const RuntimeEnv> env, |
| 110 | FlatExpression flat_expr) { |
| 111 | if (flat_expr.path().empty() || |
| 112 | flat_expr.path().front()->GetNativeTypeId() != |
| 113 | cel::NativeTypeId::For<WrappedDirectStep>()) { |
| 114 | return absl::InvalidArgumentError(absl::StrCat( |
| 115 | "Expected a recursive program step", flat_expr.path().size())); |
| 116 | } |
| 117 | |
| 118 | auto* instance = |
| 119 | new CelExpressionRecursiveImpl(std::move(env), std::move(flat_expr)); |
| 120 | |
| 121 | return absl::WrapUnique(instance); |
| 122 | } |
| 123 | |
| 124 | absl::StatusOr<CelValue> CelExpressionRecursiveImpl::Trace( |
| 125 | const BaseActivation& activation, google::protobuf::Arena* arena, |
nothing calls this directly
no test coverage detected