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

Function ConstantKind

parser/parser_test.cc:1300–1319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1298 "optional.none()^#11:Expr.Call#\n)^#12:Expr.Call#"}};
1299
1300absl::string_view ConstantKind(const cel::Constant& c) {
1301 switch (c.kind_case()) {
1302 case ConstantKindCase::kBool:
1303 return "bool";
1304 case ConstantKindCase::kInt:
1305 return "int64";
1306 case ConstantKindCase::kUint:
1307 return "uint64";
1308 case ConstantKindCase::kDouble:
1309 return "double";
1310 case ConstantKindCase::kString:
1311 return "string";
1312 case ConstantKindCase::kBytes:
1313 return "bytes";
1314 case ConstantKindCase::kNull:
1315 return "NullValue";
1316 default:
1317 return "unspecified_constant";
1318 }
1319}
1320
1321absl::string_view ExprKind(const cel::Expr& e) {
1322 switch (e.kind_case()) {

Callers 1

AdornMethod · 0.85

Calls 1

kind_caseMethod · 0.80

Tested by

no test coverage detected