MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / ReferenceToProto

Function ReferenceToProto

common/ast_proto.cc:309–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309absl::StatusOr<ReferencePb> ReferenceToProto(const Reference& reference) {
310 ReferencePb result;
311
312 result.set_name(reference.name());
313
314 for (const auto& overload_id : reference.overload_id()) {
315 result.add_overload_id(overload_id);
316 }
317
318 if (reference.has_value()) {
319 CEL_RETURN_IF_ERROR(
320 ConstantToProto(reference.value(), result.mutable_value()));
321 }
322
323 return result;
324}
325
326absl::Status TypeToProto(const TypeSpec& type, TypePb* result);
327

Callers 1

AstToCheckedExprFunction · 0.85

Calls 6

ConstantToProtoFunction · 0.85
mutable_valueMethod · 0.80
set_nameMethod · 0.45
nameMethod · 0.45
has_valueMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected