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

Function KindToString

testing/testrunner/coverage_index.cc:65–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65std::string KindToString(const NavigableProtoAstNode& node) {
66 if (node.parent_relation() != ChildKind::kUnspecified &&
67 node.parent()->expr()->has_comprehension_expr()) {
68 const cel::expr::Expr::Comprehension& comp =
69 node.parent()->expr()->comprehension_expr();
70 if (node.expr()->id() == comp.iter_range().id()) return "IterRange";
71 if (node.expr()->id() == comp.accu_init().id()) return "AccuInit";
72 if (node.expr()->id() == comp.loop_condition().id()) return "LoopCondition";
73 if (node.expr()->id() == comp.loop_step().id()) return "LoopStep";
74 if (node.expr()->id() == comp.result().id()) return "Result";
75 }
76
77 return absl::StrCat(NodeKindName(node.node_kind()), " Node");
78}
79
80const Type* absl_nullable FindCheckerType(const CheckedExpr& expr,
81 int64_t expr_id) {

Callers 1

Calls 7

NodeKindNameFunction · 0.85
parent_relationMethod · 0.80
parentMethod · 0.80
node_kindMethod · 0.80
exprMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected