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

Method AsString

base/attribute.cc:299–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299const absl::StatusOr<std::string> Attribute::AsString() const {
300 if (variable_name().empty()) {
301 return absl::InvalidArgumentError(
302 "Only ident rooted attributes are supported.");
303 }
304
305 std::string result = std::string(variable_name());
306
307 for (const auto& qualifier : qualifier_path()) {
308 CEL_RETURN_IF_ERROR(absl::visit(
309 AttributeStringPrinter(&result, qualifier.kind()), qualifier.value_));
310 }
311
312 return result;
313}
314
315bool AttributeQualifier::IsMatch(const AttributeQualifier& other) const {
316 if (absl::holds_alternative<Kind>(value_) ||

Callers

nothing calls this directly

Calls 5

kindFunction · 0.50
emptyMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected